From 5bc036d71ff6094e550c99168eae2e2b4d495f51 Mon Sep 17 00:00:00 2001 From: zhangqian <zhangqian@123.com> Date: 星期三, 13 九月 2023 21:10:26 +0800 Subject: [PATCH] 增加位置表,产品分类表,产品表 --- models/location.go | 13 +++++++++++-- 1 files changed, 11 insertions(+), 2 deletions(-) diff --git a/models/location.go b/models/location.go index 54ec4af..0146ca0 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 { -- Gitblit v1.8.0