暂存一下,防止丢失
This commit is contained in:
@@ -7,18 +7,19 @@ import (
|
||||
// Shop 店铺模型
|
||||
type Shop struct {
|
||||
gorm.Model
|
||||
BaseModel `gorm:"embedded"`
|
||||
ShopName string `gorm:"column:shop_name;type:varchar(100);not null;comment:店铺名称" json:"shop_name"`
|
||||
ShopCode string `gorm:"column:shop_code;type:varchar(50);uniqueIndex:idx_shop_code,where:deleted_at IS NULL;comment:店铺编号" json:"shop_code"`
|
||||
ParentID *uint `gorm:"column:parent_id;index;comment:上级店铺ID(NULL表示一级代理)" json:"parent_id,omitempty"`
|
||||
Level int `gorm:"column:level;type:int;not null;default:1;comment:层级(1-7)" json:"level"`
|
||||
ContactName string `gorm:"column:contact_name;type:varchar(50);comment:联系人姓名" json:"contact_name"`
|
||||
ContactPhone string `gorm:"column:contact_phone;type:varchar(20);comment:联系人电话" json:"contact_phone"`
|
||||
Province string `gorm:"column:province;type:varchar(50);comment:省份" json:"province"`
|
||||
City string `gorm:"column:city;type:varchar(50);comment:城市" json:"city"`
|
||||
District string `gorm:"column:district;type:varchar(50);comment:区县" json:"district"`
|
||||
Address string `gorm:"column:address;type:varchar(255);comment:详细地址" json:"address"`
|
||||
Status int `gorm:"column:status;type:int;not null;default:1;comment:状态 0=禁用 1=启用" json:"status"`
|
||||
BaseModel `gorm:"embedded"`
|
||||
ShopName string `gorm:"column:shop_name;type:varchar(100);not null;comment:店铺名称" json:"shop_name"`
|
||||
ShopCode string `gorm:"column:shop_code;type:varchar(50);uniqueIndex:idx_shop_code,where:deleted_at IS NULL;comment:店铺编号" json:"shop_code"`
|
||||
ParentID *uint `gorm:"column:parent_id;index;comment:上级店铺ID(NULL表示一级代理)" json:"parent_id,omitempty"`
|
||||
BusinessOwnerAccountID *uint `gorm:"column:business_owner_account_id;index:idx_shop_business_owner_account_id;comment:平台业务员账号ID" json:"business_owner_account_id,omitempty"`
|
||||
Level int `gorm:"column:level;type:int;not null;default:1;comment:层级(1-7)" json:"level"`
|
||||
ContactName string `gorm:"column:contact_name;type:varchar(50);comment:联系人姓名" json:"contact_name"`
|
||||
ContactPhone string `gorm:"column:contact_phone;type:varchar(20);comment:联系人电话" json:"contact_phone"`
|
||||
Province string `gorm:"column:province;type:varchar(50);comment:省份" json:"province"`
|
||||
City string `gorm:"column:city;type:varchar(50);comment:城市" json:"city"`
|
||||
District string `gorm:"column:district;type:varchar(50);comment:区县" json:"district"`
|
||||
Address string `gorm:"column:address;type:varchar(255);comment:详细地址" json:"address"`
|
||||
Status int `gorm:"column:status;type:int;not null;default:1;comment:状态 0=禁用 1=启用" json:"status"`
|
||||
}
|
||||
|
||||
// TableName 指定表名
|
||||
|
||||
Reference in New Issue
Block a user