From 39086a8323ecfc2af7ca46d1415ea7e66c310c63 Mon Sep 17 00:00:00 2001
From: zhangqian <zhangqian@123.com>
Date: 星期五, 29 三月 2024 10:33:06 +0800
Subject: [PATCH] fix
---
model/purchase/purchase_products.go | 18 +++++++++++-------
1 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/model/purchase/purchase_products.go b/model/purchase/purchase_products.go
index c04ff6b..7c24638 100644
--- a/model/purchase/purchase_products.go
+++ b/model/purchase/purchase_products.go
@@ -8,11 +8,15 @@
type PurchaseProducts struct {
global.GVA_MODEL
- PurchaseId int `json:"purchaseId" form:"purchaseType" gorm:"type:int(11);not null;default 0;comment:閲囪喘绫诲瀷id"` // 閲囪喘id
- ProductId int `json:"productId" form:"supplierId" gorm:"type:int(11);not null;default 0;comment:渚涘簲鍟唅d"` // 浜у搧id
- Product test.Product `json:"-" gorm:"foreignKey:ProductId"`
- Amount decimal.Decimal `json:"amount" form:"amount" gorm:"type:decimal(12,2);not null;default 0;comment:閲囪喘鏁伴噺"` // 閲囪喘鏁伴噺
- Price decimal.Decimal `json:"price" form:"price" gorm:"type:decimal(12,2);not null;default 0.00;comment:閲囪喘鍗曚环"` // 閲囪喘鍗曚环
- Total decimal.Decimal `json:"total" form:"total" gorm:"type:decimal(12,2);not null;default 0.00;comment:閲囪喘鎬讳环"` // 閲囪喘鎬讳环
- Remark string `json:"remark" form:"remark" gorm:"type:varchar(1000);not null; default '';comment:鎻忚堪"` //鎻忚堪
+ PurchaseId int `json:"purchaseId" form:"purchaseType" gorm:"type:int(11);not null;default 0;comment:閲囪喘鍗昳d"` // 閲囪喘id
+ ProductId int `json:"productId" form:"productId" gorm:"type:int;not null;default 0;comment:浜у搧id"` // 浜у搧id
+ Product test.SupplierMaterial `json:"-" gorm:"foreignKey:ProductId"`
+ Amount decimal.Decimal `json:"amount" form:"amount" gorm:"type:decimal(12,2);not null;default 0;comment:閲囪喘鏁伴噺"` // 閲囪喘鏁伴噺
+ Price decimal.Decimal `json:"price" form:"price" gorm:"type:decimal(12,2);not null;default 0.00;comment:閲囪喘鍗曚环"` // 閲囪喘鍗曚环
+ Total decimal.Decimal `json:"total" form:"total" gorm:"type:decimal(12,2);not null;default 0.00;comment:閲囪喘鎬讳环"` // 閲囪喘鎬讳环
+ Remark string `json:"remark" form:"remark" gorm:"type:varchar(1000);not null; default '';comment:鎻忚堪"` //鎻忚堪
+}
+
+func (PurchaseProducts) TableName() string {
+ return "srm_purchase_products"
}
--
Gitblit v1.8.0