store.go 1.6 KB

123456789101112131415161718192021222324252627
  1. package gorm_model
  2. import (
  3. "time"
  4. )
  5. type Store struct {
  6. StoreId int `gorm:"column:store_id;primary_key;AUTO_INCREMENT"` // 门店id
  7. StoreName string `gorm:"column:store_name;NOT NULL"` // 门店名称
  8. StoreCategory string `gorm:"column:store_category;NOT NULL"` // 门店类目(/分隔)
  9. StoreType int `gorm:"column:store_type;NOT NULL"` // 门店类型,1单门店,2连锁门店
  10. StoreLocation string `gorm:"column:store_location"` // 门店地址
  11. StoreDetail string `gorm:"column:store_detail"` // 门店特点
  12. StoreLink string `gorm:"column:store_link"` // 分销链接
  13. TeamNum int `gorm:"column:team_num;default:0;NOT NULL"` // 包含团购套餐数
  14. BelongEnterpriseId string `gorm:"column:belong_enterprise_id"` // 门店所属商家ID
  15. IsDeleted int `gorm:"column:is_deleted;default:0;NOT NULL"` // 已删除(0否 1是)
  16. OperateType int `gorm:"column:operate_type;NOT NULL"` // 操作人类型(1商家 2后台)
  17. EnterpriseId string `gorm:"column:enterprise_id;NOT NULL"` // 商家id
  18. SubAccountId int `gorm:"column:sub_account_id;default:0;NOT NULL"` // 商家子账号id
  19. CreatedAt time.Time `gorm:"column:created_at;NOT NULL"` // 创建时间
  20. UpdatedAt time.Time `gorm:"column:updated_at"` // 更新时间
  21. }
  22. func (m *Store) TableName() string {
  23. return "younggee_store"
  24. }