| 12345678910111213141516171819202122232425262728293031323334 |
- package entity
- // 用户基础信息表
- type User struct {
- MysqlFullModel
- Uid string `json:"uid" gorm:"index;type:varchar(64);comment:交易所ID:;"`
- OpenId string `json:"openId" gorm:"type:VARCHAR(64);comment:平台OPEN_ID"`
- Code string `json:"code" gorm:"type:VARCHAR(32);comment:平台邀请码"`
- RefCode string `json:"refCode" gorm:"index;type:VARCHAR(32);comment:平台上级邀请码"`
- ParentId int64 `json:"parentId" gorm:"type:bigint;default:0;column:parent_id;comment:上级ID"`
- ParentUid string `json:"parentUid" gorm:"index;type:varchar(64);default:'';comment:上级交易所ID"`
- ParentIds []int64 `json:"parentIds" gorm:"serializer:json;type:json;column:parent_ids;comment:上级ID路径,使用json查询"`
- Enable bool `json:"enable" gorm:"type:tinyint;default:0;comment:账户是否有效 1=有效 0=无效"`
- LockWithdraw bool `json:"lockWithdraw" gorm:"type:tinyint;default:0;comment:锁定提现 0=未锁定 1=锁定"`
- IsWhite bool `json:"isWhite" gorm:"type:tinyint;default:0;comment: 1=白名单 0=正常用户"`
- IsReinvestment bool `json:"isReinvestment" gorm:"default:0;comment:是否开启复投"`
- LastLoginTime int64 `json:"lastLoginTime" gorm:"comment:最近一次登陆时间"`
- LastLoginIp string `json:"lastLoginIp" gorm:"type:VARCHAR(200);comment:最后登陆IP"`
- LastLoginRemoteIp string `json:"lastLoginRemoteIp" gorm:"type:VARCHAR(200);comment:最后登陆RemoteIP"`
- Remark string `json:"remark" gorm:"type:VARCHAR(200);comment:备注信息"`
- }
- func (*User) TableName() string {
- return ModelPrefix + "user"
- }
- func (*User) Comment() string {
- return "用户基础信息"
- }
- func NewUser() *User {
- return &User{}
- }
|