24 lines
918 B
Go
24 lines
918 B
Go
|
package model
|
||
|
|
||
|
type Status int64
|
||
|
|
||
|
type User struct {
|
||
|
Id uint64 `json:"id" gorm:"primaryKey;column:id"`
|
||
|
CreatedAt int64 `json:"created_at" gorm:"column:created_at;autoCreateTime:milli"`
|
||
|
UpdatedAt int64 `json:"updated_at" gorm:"column:updated_at;autoUpdateTime:milli"`
|
||
|
DeletedAt int64 `json:"deleted_at" gorm:"index;column:deleted_at;default:0"`
|
||
|
|
||
|
Username string `json:"username" gorm:"column:username;type:varchar(64);unique"`
|
||
|
Password string `json:"-" gorm:"column:password;type:varchar(256)"`
|
||
|
|
||
|
Status Status `json:"status" gorm:"column:status;default:0"`
|
||
|
|
||
|
Nickname string `json:"nickname" gorm:"column:nickname;type:varchar(64)"`
|
||
|
Comment string `json:"comment" gorm:"column:comment"`
|
||
|
|
||
|
CreatedById uint64 `json:"created_by_id" gorm:"column:created_by_id"`
|
||
|
CreatedByName string `json:"created_by_name" gorm:"column:created_by_name;type:varchar(64)"`
|
||
|
|
||
|
LoginAt int64 `json:"login_at" gorm:"-"`
|
||
|
}
|