client.card.go 1.6 KB

123456789101112131415161718192021222324
  1. package shanghu
  2. import (
  3. "time"
  4. )
  5. // 用户买卡信息,用于判断用户买卡的上级分销人员,如果没有分销人员默认平台
  6. type MerchantClientCard struct {
  7. ID int64 `gorm:"column:id;type:bigint(20);primary_key;AUTO_INCREMENT" json:"id"` // 主键
  8. MerchantCardID int64 `gorm:"column:merchant_card_id;type:bigint(20)" json:"merchant_card_id"` // 商户卡id
  9. NumberUse int `gorm:"column:number_use;type:int(11)" json:"number_use"` // 使用次数
  10. ClientInviteCode string `gorm:"column:client_Invite_code;type:varchar(10)" json:"client_Invite_code"` // 买卡人邀请码,没邀请码默认使用官方的
  11. MerchantCardTime int64 `gorm:"column:merchant_card_time;type:bigint(20)" json:"merchant_card_time"` // 商户卡有效期
  12. OpenID string `gorm:"column:open_id;type:varchar(255);NOT NULL" json:"open_id"` // openid
  13. CreateBy int64 `gorm:"column:create_by;type:bigint(20)" json:"create_by"` // 创建者
  14. UpdateBy int64 `gorm:"column:update_by;type:bigint(20)" json:"update_by"` // 更新者
  15. CreatedAt time.Time `gorm:"column:created_at;type:datetime(3)" json:"created_at"` // 创建时间
  16. UpdatedAt time.Time `gorm:"column:updated_at;type:datetime(3)" json:"updated_at"` // 最后更新时间
  17. DeletedAt time.Time `gorm:"column:deleted_at;type:datetime(3)" json:"deleted_at"` // 删除时间
  18. }
  19. func (m *MerchantClientCard) TableName() string {
  20. return "merchant_client_card"
  21. }