dt_user_extend.go 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. package daytask
  2. // DtUserSocial 用户社交账号绑定表
  3. type DtUserSocial struct {
  4. Id int64 `json:"id" gorm:"column:id;type:bigint;primarykey;comment:ID"`
  5. UserId int64 `json:"userId" gorm:"column:user_id;type:bigint;not null;uniqueIndex:uk_user_platform,priority:1;comment:用户ID"`
  6. Platform string `json:"platform" gorm:"column:platform;type:varchar(32);not null;uniqueIndex:uk_user_platform,priority:2;index:idx_platform;comment:平台: tiktok/telegram/zalo"`
  7. Account string `json:"account" gorm:"column:account;type:varchar(128);not null;comment:账号"`
  8. Nickname string `json:"nickname" gorm:"column:nickname;type:varchar(64);comment:昵称"`
  9. Avatar string `json:"avatar" gorm:"column:avatar;type:varchar(255);comment:头像"`
  10. Extra string `json:"extra" gorm:"column:extra;type:json;comment:扩展信息"`
  11. Status int8 `json:"status" gorm:"column:status;type:tinyint;default:1;comment:状态: 0=未验证 1=已验证"`
  12. CreatedAt int64 `json:"createdAt" gorm:"column:created_at;type:bigint;autoCreateTime;comment:创建时间"`
  13. UpdatedAt int64 `json:"updatedAt" gorm:"column:updated_at;type:bigint;autoUpdateTime;comment:更新时间"`
  14. }
  15. func (*DtUserSocial) TableName() string {
  16. return "dt_user_social"
  17. }
  18. func NewDtUserSocial() *DtUserSocial {
  19. return &DtUserSocial{}
  20. }
  21. // DtUserPayment 用户收款方式表
  22. type DtUserPayment struct {
  23. Id int64 `json:"id" gorm:"column:id;type:bigint;primarykey;comment:ID"`
  24. UserId int64 `json:"userId" gorm:"column:user_id;type:bigint;not null;index:idx_user_id;comment:用户ID"`
  25. Type string `json:"type" gorm:"column:type;type:varchar(32);not null;index:idx_type;comment:类型: usdt/bank/momo/zalopay"`
  26. Name string `json:"name" gorm:"column:name;type:varchar(64);comment:姓名"`
  27. Account string `json:"account" gorm:"column:account;type:varchar(128);not null;comment:账号/地址"`
  28. BankName string `json:"bankName" gorm:"column:bank_name;type:varchar(64);comment:银行名称"`
  29. BankBranch string `json:"bankBranch" gorm:"column:bank_branch;type:varchar(128);comment:支行"`
  30. Qrcode string `json:"qrcode" gorm:"column:qrcode;type:varchar(255);comment:收款二维码"`
  31. IsDefault int8 `json:"isDefault" gorm:"column:is_default;type:tinyint;default:0;comment:是否默认: 0=否 1=是"`
  32. Status int8 `json:"status" gorm:"column:status;type:tinyint;default:1;comment:状态: 0=禁用 1=启用"`
  33. CreatedAt int64 `json:"createdAt" gorm:"column:created_at;type:bigint;autoCreateTime;comment:创建时间"`
  34. UpdatedAt int64 `json:"updatedAt" gorm:"column:updated_at;type:bigint;autoUpdateTime;comment:更新时间"`
  35. }
  36. func (*DtUserPayment) TableName() string {
  37. return "dt_user_payment"
  38. }
  39. func NewDtUserPayment() *DtUserPayment {
  40. return &DtUserPayment{}
  41. }