From 8b89d1c42d257fbee18216c636bc4ead8d7a9cf9 Mon Sep 17 00:00:00 2001 From: zhansan <1061428287@qq.com> Date: 星期二, 19 九月 2023 10:52:56 +0800 Subject: [PATCH] 修改产品两张表都以wms_打头 --- models/location.go | 15 ++++++++++++--- 1 files changed, 12 insertions(+), 3 deletions(-) diff --git a/models/location.go b/models/location.go index 54ec4af..41e6992 100644 --- a/models/location.go +++ b/models/location.go @@ -3,6 +3,7 @@ import ( "fmt" "gorm.io/gorm" + "wms/constvar" "wms/pkg/mysqlx" ) @@ -10,8 +11,16 @@ // Location 浣嶇疆 Location struct { WmsModel - Id int `json:"id" gorm:"column:id;primary_key;AUTO_INCREMENT"` - Name string `json:"name" gorm:"index;type:varchar(255);not null;comment:浣嶇疆鍚嶇О"` //浣嶇疆鍚嶇О + Id int `json:"id" gorm:"column:id;primary_key;AUTO_INCREMENT"` + Name string `json:"name" gorm:"index;type:varchar(255);not null;comment:浣嶇疆鍚嶇О"` //浣嶇疆鍚嶇О + ParentId int `json:"parentId" gorm:"type:int;not null"` //涓婄骇id + CompanyId int `json:"companyId" gorm:"type:int;not null"` //鍏徃id + Company Company `json:"company" gorm:"foreignKey:CompanyId"` //鍏徃 + Type constvar.LocationType `json:"type" gorm:"type:tinyint;not null;comment:浣嶇疆绫诲瀷"` //浣嶇疆绫诲瀷 + CountFrequency int `json:"countFrequency" gorm:"type:tinyint;not null;comment:鐩樼偣棰戠巼锛堝ぉ锛�"` //鐩樼偣棰戠巼锛堝ぉ锛� + IsScrapLocation bool `json:"isScrapLocation" gorm:"type:tinyint;not null;comment:鏄惁鎶ュ簾浣嶇疆"` //鏄惁鎶ュ簾浣嶇疆 + IsReturnLocation bool `json:"isReturnLocation" gorm:"type:tinyint;not null;comment:鏄惁閫�璐т綅缃�"` //鏄惁閫�璐т綅缃� + ReplenishLocation bool `json:"replenishLocation" gorm:"type:tinyint;not null;comment:鏄惁琛ュ厖浣嶇疆"` //鏄惁琛ュ厖浣嶇疆 } LocationSearch struct { @@ -26,7 +35,7 @@ ) func (slf *Location) TableName() string { - return "location" + return "wms_location" } func NewLocationSearch() *LocationSearch { -- Gitblit v1.8.0