| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- package daytask
- import (
- "time"
- )
- // DtUser 用户表
- type DtUser struct {
- Id int64 `json:"id" gorm:"column:id;type:bigint;primarykey;comment:用户ID"`
- Uid string `json:"uid" gorm:"column:uid;type:varchar(32);not null;uniqueIndex:uk_uid;comment:用户UID"`
- Phone string `json:"phone" gorm:"column:phone;type:varchar(32);not null;uniqueIndex:uk_phone;comment:手机号"`
- Password string `json:"-" gorm:"column:password;type:varchar(128);not null;comment:登录密码"`
- PayPassword string `json:"-" gorm:"column:pay_password;type:varchar(128);comment:支付密码"`
- Nickname string `json:"nickname" gorm:"column:nickname;type:varchar(64);comment:昵称"`
- Avatar string `json:"avatar" gorm:"column:avatar;type:varchar(255);comment:头像"`
- InviteCode string `json:"inviteCode" gorm:"column:invite_code;type:varchar(16);not null;uniqueIndex:uk_invite_code;comment:邀请码"`
- ParentId int64 `json:"parentId" gorm:"column:parent_id;type:bigint;default:0;index:idx_parent_id;comment:上级用户ID"`
- ParentUid string `json:"parentUid" gorm:"column:parent_uid;type:varchar(32);comment:上级用户UID"`
- LevelId int64 `json:"levelId" gorm:"column:level_id;type:bigint;default:1;index:idx_level_id;comment:用户等级ID"`
- Balance float64 `json:"balance" gorm:"column:balance;type:decimal(18,2);default:0.00;comment:账户余额(USDT)"`
- FrozenBalance float64 `json:"frozenBalance" gorm:"column:frozen_balance;type:decimal(18,2);default:0.00;comment:冻结余额"`
- TotalRecharge float64 `json:"totalRecharge" gorm:"column:total_recharge;type:decimal(18,2);default:0.00;comment:累计充值"`
- TotalWithdraw float64 `json:"totalWithdraw" gorm:"column:total_withdraw;type:decimal(18,2);default:0.00;comment:累计提现"`
- TotalTaskIncome float64 `json:"totalTaskIncome" gorm:"column:total_task_income;type:decimal(18,2);default:0.00;comment:累计任务收益"`
- TotalInviteIncome float64 `json:"totalInviteIncome" gorm:"column:total_invite_income;type:decimal(18,2);default:0.00;comment:累计推广收益"`
- TodayTaskCount int `json:"todayTaskCount" gorm:"column:today_task_count;type:int;default:0;comment:今日完成任务数"`
- TotalTaskCount int `json:"totalTaskCount" gorm:"column:total_task_count;type:int;default:0;comment:累计完成任务数"`
- DirectInviteCount int `json:"directInviteCount" gorm:"column:direct_invite_count;type:int;default:0;comment:直推人数"`
- TeamCount int `json:"teamCount" gorm:"column:team_count;type:int;default:0;comment:团队人数"`
- Status int8 `json:"status" gorm:"column:status;type:tinyint;default:1;comment:状态: 0=禁用 1=正常"`
- IsRealName int8 `json:"isRealName" gorm:"column:is_real_name;type:tinyint;default:0;comment:是否实名: 0=否 1=是"`
- RealName string `json:"realName" gorm:"column:real_name;type:varchar(64);comment:真实姓名"`
- IdCard string `json:"idCard" gorm:"column:id_card;type:varchar(64);comment:身份证号"`
- RegisterIp string `json:"registerIp" gorm:"column:register_ip;type:varchar(64);comment:注册IP"`
- RegisterDevice string `json:"registerDevice" gorm:"column:register_device;type:varchar(255);comment:注册设备"`
- LastLoginTime int64 `json:"lastLoginTime" gorm:"column:last_login_time;type:bigint;comment:最后登录时间"`
- LastLoginIp string `json:"lastLoginIp" gorm:"column:last_login_ip;type:varchar(64);comment:最后登录IP"`
- Remark string `json:"remark" gorm:"column:remark;type:varchar(255);comment:备注"`
- CreatedAt int64 `json:"createdAt" gorm:"column:created_at;type:bigint;autoCreateTime;comment:创建时间"`
- UpdatedAt int64 `json:"updatedAt" gorm:"column:updated_at;type:bigint;autoUpdateTime;comment:更新时间"`
- DeletedAt *time.Time `json:"deletedAt,omitempty" gorm:"column:deleted_at;type:datetime;index;comment:删除时间"`
- }
- func (*DtUser) TableName() string {
- return "dt_user"
- }
- func NewDtUser() *DtUser {
- return &DtUser{}
- }
|