From f45e4cb8045fe60f96f467dc4ea1e2ae57445712 Mon Sep 17 00:00:00 2001
From: zhangqian <zhangqian@123.com>
Date: 星期三, 03 七月 2024 23:13:40 +0800
Subject: [PATCH] 默认位置parent_id为视图位置id

---
 models/scrap.go |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/models/scrap.go b/models/scrap.go
index 830d159..144743a 100644
--- a/models/scrap.go
+++ b/models/scrap.go
@@ -15,9 +15,9 @@
 		Number string `json:"number" gorm:"column:number;type:varchar(255)"`  //鍗曞彿
 		Status int    `json:"status" gorm:"type:tinyint;not null;comment:鐘舵��"` //鐘舵��
 
-		ProductId   int             `json:"productId" gorm:"type:int;not null;comment:浜у搧id"`            //浜у搧id
-		ProductName string          `json:"productName" gorm:"type:varchar(255);not null;comment:浜у搧鍚嶇О"` //浜у搧鍚嶇О
-		Quantity    decimal.Decimal `json:"quantity" gorm:"type:decimal(20,2);not null;comment:鏁伴噺"`     //鏁伴噺
+		ProductId   int             `json:"productId" gorm:"type:int;not null;comment:浜у搧id"`                  //浜у搧id
+		ProductName string          `json:"productName" gorm:"type:varchar(255);not null;comment:浜у搧鍚嶇О"`       //浜у搧鍚嶇О
+		Quantity    decimal.Decimal `json:"quantity" gorm:"type:decimal(20,2);not null;default:0;comment:鏁伴噺"` //鏁伴噺
 
 		FromLocationId int      `json:"fromLocationId"   gorm:"type:int;not null;comment:婧愪綅缃甶d"` //婧愪綅缃甶d
 		FromLocation   Location `json:"fromLocation"     gorm:"foreignKey:FromLocationId"`       //婧愪綅缃�
@@ -38,7 +38,7 @@
 )
 
 func (slf *Scrap) TableName() string {
-	return "scrap"
+	return "wms_scrap"
 }
 
 func NewScrapSearch() *ScrapSearch {

--
Gitblit v1.8.0