package model type PartPurchase struct { Id int64 `gorm:"column:id"` BigId int64 `gorm:"column:bigId"` PastureId int64 `gorm:"column:pastureId"` PartId int64 `gorm:"column:partId"` PartName string `gorm:"column:partName"` PartCode string `gorm:"column:partCode"` Amount int64 `gorm:"column:amount"` Note string `gorm:"column:note"` IsStorage int32 `gorm:"column:isStorage"` Specification string `gorm:"column:specification"` Purpose string `gorm:"column:purpose"` Unit string `gorm:"column:unit"` BrandId int64 `gorm:"column:brandId"` StorageAmount float64 `gorm:"column:storageAmount"` Price string `gorm:"column:price"` ContractId string `gorm:"column:contractId"` LifeCycle string `gorm:"column:lifeCycle"` ContractVarianceItem string `gorm:"column:contractVarianceItem"` Reject string `gorm:"column:reject"` DepartmentId string `gorm:"column:departmentId"` Explain string `gorm:"column:explain"` Date string `gorm:"column:date"` EmployeId int64 `gorm:"column:employeId"` } func (p *PartPurchase) TableName() string { return "partpurchase" } func NewPartPurchase( bigId, pastureId, partId, brandId, amount int64, contractId, partCode, partName, specification, unit, purpose, price string, storageAmount float64, departmentId, date string, employeId int64, //func NewPartPurchase( // bigId, pastureId, partId, brandId, amount int64, // contractId, partCode, partName, specification, unit, purpose, price string, // storageAmount float64, ) *PartPurchase { return &PartPurchase{ BigId: bigId, PastureId: pastureId, PartId: partId, PartName: partName, PartCode: partCode, Amount: amount, Note: "", IsStorage: 1, Specification: specification, Purpose: purpose, Unit: unit, BrandId: brandId, StorageAmount: storageAmount, Price: price, ContractId: contractId, Reject: "0", DepartmentId: departmentId, Date: date, EmployeId: employeId, } } type EditPartpurchaseReq struct { Id int64 `json:"id"` BigId int64 `json:"bigId"` PastureId int64 `json:"pastureId"` PartId int64 `json:"partId"` PartCode string `json:"partCode"` PartName string `json:"partName"` Specification string `json:"specification"` Amount int64 `json:"amount"` Unit string `json:"unit"` BrandId int64 `json:"brandId"` Purpose string `json:"purpose"` StorageAmount float64 `json:"storageAmount"` Price string `json:"price"` ContractId string `json:"contractId"` LifeCycle string `json:"lifeCycle"` ContractVarianceItem string `json:"contractVarianceItem"` Reject string `json:"reject"` DepartmentId string `json:"departmentId"` Explain string `json:"explain"` Date string `json:"date"` EmployeId int64 `json:"employeId"` }