| | |
| | | |
| | | import ( |
| | | "srm/model/common/request" |
| | | "srm/model/test" |
| | | "time" |
| | | ) |
| | | |
| | | type ProductSearch struct { |
| | | test.Product |
| | | SupplierNumber string `json:"supplierNumber" form:"supplierNumber"` |
| | | StartCreatedAt *time.Time `json:"startCreatedAt" form:"startCreatedAt"` |
| | | EndCreatedAt *time.Time `json:"endCreatedAt" form:"endCreatedAt"` |
| | | Product |
| | | request.PageInfo |
| | | } |
| | | |
| | | type ProductCreate struct { |
| | | List []*test.Product `json:"list"` |
| | | List []*Product `json:"list"` |
| | | } |
| | | |
| | | type Product struct { |
| | | Name string `json:"name" form:"name" gorm:"column:name;comment:名称;size:255;"` |
| | | Number string `json:"number" form:"number" gorm:"column:number;comment:编码;size:255;"` |
| | | SupplierId uint `json:"supplierId" form:"supplierId" gorm:"column:supplier_id;comment:供应商id;size:255;"` |
| | | Supplier string `json:"supplier" form:"supplier" gorm:"foreignKey:SupplierId;references:ID;comment:供应商"` |
| | | Unit string `json:"unit" form:"unit" gorm:"column:unit;comment:计量单位;size:255;"` |
| | | PurchasePrice float64 `json:"purchasePrice" form:"purchasePrice" gorm:"column:purchase_price;comment:采购价格;"` |
| | | DeliveryTime int `json:"deliveryTime" form:"deliveryTime" gorm:"column:delivery_time;comment:;size:11;"` |
| | | ShippingDuration int `json:"shippingDuration" form:"shippingDuration" gorm:"column:shipping_duration;comment:物流时长;size:11;"` |
| | | Specifications string `json:"specifications" form:"specifications" gorm:"column:specifications;comment:规格;size:255;"` |
| | | ModelNumber string `json:"modelNumber" form:"modelNumber" gorm:"column:model_number;comment:型号;size:255;"` |
| | | CategoryName string `json:"categoryName" form:"categoryName" gorm:"column:category_name;comment:产品类别;size:255;"` |
| | | SupplierName string `json:"supplierName" gorm:"-"` |
| | | SupplierNumber string `json:"supplierNumber" form:"supplierNumber"` |
| | | } |