|
@@ -1,7 +1,5 @@
|
|
|
package model
|
|
|
|
|
|
-import "fmt"
|
|
|
-
|
|
|
type PartPurchase struct {
|
|
|
Id int64 `gorm:"column:id"`
|
|
|
BigId int64 `gorm:"column:bigId"`
|
|
@@ -26,8 +24,8 @@ func (p *PartPurchase) TableName() string {
|
|
|
}
|
|
|
|
|
|
func NewPartPurchase(
|
|
|
- bigId, pastureId, partId, brandId, amount, contractId int64,
|
|
|
- partCode, partName, specification, unit, purpose, price string,
|
|
|
+ bigId, pastureId, partId, brandId, amount int64,
|
|
|
+ contractId, partCode, partName, specification, unit, purpose, price string,
|
|
|
storageAmount float64,
|
|
|
) *PartPurchase {
|
|
|
return &PartPurchase{
|
|
@@ -45,6 +43,6 @@ func NewPartPurchase(
|
|
|
BrandId: brandId,
|
|
|
StorageAmount: storageAmount,
|
|
|
Price: price,
|
|
|
- ContractId: fmt.Sprintf("%d", contractId),
|
|
|
+ ContractId: contractId,
|
|
|
}
|
|
|
}
|