model

package
v0.0.0-...-2c6e621 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 15, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type User

type User struct {
	ID        int64  `gorm:"column:id;" json:"id"`
	Name      string `gorm:"column:name;" json:"name"`
	Email     string `gorm:"column:email;" json:"email"`
	Password  string `gorm:"column:password;" json:"password"`
	AvatarURL string `gorm:"avatar_url" json:"avatar_url"`
	Role      int    `gorm:"role" json:"role"`
	Source    string `gorm:"source" json:"source"`
	Active    int    `gorm:"active" json:"active"`

	CreatedAt time.Time `gorm:"column:created_at;default:CURRENT_TIMESTAMP" json:"created_at"`
	UpdatedAt time.Time `gorm:"column:updated_at;default:CURRENT_TIMESTAMP" json:"updated_at"`
	DeletedAt int64     `gorm:"column:deleted_at;default:0" json:"deleted_at"`
}

User model

func (*User) TableName

func (*User) TableName() string

TableName 表名

type UserOauth2

type UserOauth2 struct {
	ID        int64  `gorm:"column:id;" json:"id"`
	SourceID  int64  `gorm:"source_id" json:"source_id"`
	Source    string `gorm:"source" json:"source"`
	AvatarURL string `gorm:"avatar_url" json:"avatar_url"`

	CreatedAt time.Time `gorm:"column:created_at;default:CURRENT_TIMESTAMP" json:"created_at"`
	UpdatedAt time.Time `gorm:"column:updated_at;default:CURRENT_TIMESTAMP" json:"updated_at"`
	DeletedAt int64     `gorm:"column:deleted_at;default:0" json:"deleted_at"`
}

UserOauth2 model

func (*UserOauth2) TableName

func (*UserOauth2) TableName() string

TableName 表名

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL