From 0260b7a960b806e61ccd60597c549dfd595ba584 Mon Sep 17 00:00:00 2001
From: liujiandao <274878379@qq.com>
Date: 星期二, 19 九月 2023 11:10:41 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.5.5:10010/r/aps/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