package test import ( "srm/global" ) // SupplierMaterial 结构体 type SupplierMaterial struct { global.GVA_MODEL Name string `gorm:"type:varchar(191);not null;comment:物料名称" json:"name"` 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 Supplier `json:"supplier" form:"supplier" gorm:"foreignKey:SupplierId;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;"` MinimumStock int64 `json:"minimumStock" form:"minimumStock" gorm:"column:minimum_stock;comment:最低库存;"` MaximumStock int64 `json:"maximumStock" form:"maximumStock" gorm:"column:maximum_stock;comment:最高库存;"` CategoryName string `gorm:"type:varchar(255);comment:产品类别名称" json:"categoryName"` //产品类别名称 } // TableName Product 表名 func (SupplierMaterial) TableName() string { return "srm_supplier_material" }