stroe.go 2.1 KB

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