magic_user.go 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. package app
  2. // 引入关联包
  3. import (
  4. "time"
  5. )
  6. type MagicUser struct {
  7. Id int64 `json:"id" gorm:"column:id;type:bigint;comment:id;primarykey;NOT NULL"`
  8. CreatedAt int64 `json:"createdAt" gorm:"column:created_at;type:bigint;comment:创建时间"`
  9. UpdatedAt int64 `json:"updatedAt" gorm:"column:updated_at;type:bigint;comment:更新时间"`
  10. DeletedAt time.Time `json:"deletedAt" gorm:"column:deleted_at;type:datetime;comment:删除时间;index"`
  11. Uid string `json:"uid" gorm:"column:uid;type:varchar(64);comment:交易所ID:;index"`
  12. OpenId string `json:"openId" gorm:"column:open_id;type:varchar(64);comment:平台OPEN_ID"`
  13. Code string `json:"code" gorm:"column:code;type:varchar(32);comment:平台邀请码"`
  14. RefCode string `json:"refCode" gorm:"column:ref_code;type:varchar(32);comment:平台上级邀请码;index"`
  15. ParentId int64 `json:"parentId" gorm:"column:parent_id;type:bigint;comment:上级ID"`
  16. ParentUid string `json:"parentUid" gorm:"column:parent_uid;type:varchar(64);comment:上级交易所ID;index"`
  17. ParentIds []int64 `json:"parentIds" gorm:"serializer:json;type:json;column:parent_ids;comment:上级ID路径,使用json查询"`
  18. LastLoginTime int64 `json:"lastLoginTime" gorm:"column:last_login_time;type:bigint;comment:最近一次登陆时间"`
  19. LastLoginIp string `json:"lastLoginIp" gorm:"column:last_login_ip;type:varchar(200);comment:最后登陆IP"`
  20. LastLoginRemoteIp string `json:"lastLoginRemoteIp" gorm:"column:last_login_remote_ip;type:varchar(200);comment:最后登陆RemoteIP"`
  21. IsReinvestment bool `json:"isReinvestment" gorm:"column:is_reinvestment;type:tinyint(1);comment:是否开启复投"`
  22. LockWithdraw int8 `json:"lockWithdraw" gorm:"column:lock_withdraw;type:tinyint;comment:锁定提现 0=未锁定 1=锁定"`
  23. IsWhite int8 `json:"isWhite" gorm:"column:is_white;type:tinyint;comment: 1=白名单 0=正常用户"`
  24. IsRoot bool `json:"isRoot" gorm:"column:is_root;type:tinyint(1);comment:是否根账号"`
  25. IsZero bool `json:"isZero" gorm:"column:is_zero;type:tinyint(1);comment:是否零号线"`
  26. Enable int8 `json:"enable" gorm:"column:enable;type:tinyint;comment:账户是否有效 1=有效 0=无效"`
  27. LockRedeem int8 `json:"lockRedeem" gorm:"column:lock_redeem;type:tinyint;comment:赎回锁定"`
  28. LockStakeProfit int8 `json:"lockStakeProfit" gorm:"column:lock_stake_profit;type:tinyint;comment:0 正常 1锁定不产出收益"`
  29. SubsLockWithdraw int8 `json:"subsLockWithdraw" gorm:"column:subs_lock_withdraw;type:tinyint;comment:锁定伞下提现 0=未锁定 1=锁定"`
  30. PerformanceRobot int8 `json:"performanceRobot" gorm:"column:performance_robot;type:tinyint;comment:0 正常 1 业绩机器人"`
  31. LevelRobot int8 `json:"levelRobot" gorm:"column:level_robot;type:tinyint;comment:0 正常 1 等级机器人"`
  32. InternalAccount int8 `json:"internalAccount" gorm:"column:internal_account;type:tinyint;comment:0 正常 1 内部账号"`
  33. FireRobot int8 `json:"fireRobot" gorm:"column:fire_robot;type:tinyint;comment:0 正常 1 点火机器人"`
  34. Remark string `json:"remark" gorm:"column:remark;type:varchar(200);comment:备注信息"`
  35. }
  36. func (*MagicUser) TableName() string {
  37. return "magic_user"
  38. }
  39. func NewMagicUser() *MagicUser {
  40. return &MagicUser{}
  41. }