You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

53 lines
3.1 KiB

package sqlmodel
import "time"
// UsersJson 用户表
type UsersJson struct {
Id int64 `json:"id"` //userId
Uid string `json:"uid"` //UID
CountryCode string `json:"countryCode"` //国家代码
PhoneNumber int64 `json:"phoneNumber"` //手机号
Email string `json:"email"` //电子邮箱
LoginPassword string `json:"loginPassword"` //登陆密码
TradePassword string `json:"tradePassword"` //交易密码
Surname string `json:"surname"` //姓
Name string `json:"name"` //名
Sex int32 `json:"sex"` //性别:1男 2女 0未设置
Birthday string `json:"birthday"` //出生日期
Country string `json:"country"` //国家
NickName string `json:"nickName"` //昵称
Avatar string `json:"avatar"` //头像
IsRealName int32 `json:"isRealName"` //是否已实名认证:0未认证 1已认证
InviteCode string `json:"inviteCode"` //邀请码
LastLoginTime string `json:"lastLoginTime"` //最近一次登陆时间
Status int32 `json:"status"` //状态:1 启用 2禁用 3 黑名单
AccessToken string `json:"accessToken"` //登陆令牌
AddTime string `json:"addTime"` //创建时间
UpdateTime string `json:"updateTime"` //更新时间
}
type BoUsers struct {
Id int64 `xorm:"id pk autoincr comment('userId') BIGINT"`
Uid string `xorm:"uid not null comment('UID') BIGINT"`
Countrycode string `xorm:"countryCode comment('国家代码') CHAR(6)"`
Phonenumber int64 `xorm:"phoneNumber comment('手机号') BIGINT"`
Email string `xorm:"email comment('电子邮箱') CHAR(60)"`
Loginpassword string `xorm:"loginPassword comment('登陆密码') VARCHAR(255)"`
Tradepassword string `xorm:"tradePassword comment('交易密码') VARCHAR(100)"`
Surname string `xorm:"surname comment('姓') VARCHAR(30)"`
Name string `xorm:"name comment('名') VARCHAR(60)"`
Sex int32 `xorm:"sex default 3 comment('性别:1男 2女 0未设置') TINYINT"`
Birthday time.Time `xorm:"birthday comment('出生日期') DATE"`
Country string `xorm:"country comment('国家') VARCHAR(60)"`
Nickname string `xorm:"nickName comment('昵称') VARCHAR(60)"`
Avatar string `xorm:"avatar comment('头像') VARCHAR(100)"`
Isrealname int32 `xorm:"isRealName default 0 comment('是否已实名认证:0未认证 1已认证') TINYINT"`
Invitecode string `xorm:"inviteCode comment('邀请码') VARCHAR(60)"`
Lastlogintime time.Time `xorm:"lastLoginTime comment('最近一次登陆时间') DATETIME"`
Status int32 `xorm:"status default 1 comment('状态:1 启用 2禁用 3 黑名单') TINYINT"`
Accesstoken string `xorm:"accessToken comment('登陆令牌') VARCHAR(255)"`
Addtime time.Time `xorm:"addTime comment('创建时间') DATETIME"`
Updatetime time.Time `xorm:"updateTime comment('更新时间') DATETIME"`
Deletetime time.Time `xorm:"deletetime comment('删除时间(软删除,删除写入删除时间视为删除)') DATETIME"`
}