cargo.go 463 B

12345678910111213141516
  1. package godown
  2. import "server/global"
  3. type Cargo struct {
  4. global.GVA_MODEL
  5. GoodsId int `json:"goodsId" gorm:"comment:商品id"`
  6. Goods Goods `json:"goods" gorm:"foreignKey:GoodsId;references:id;"`
  7. BuyingPrice float64 `json:"buyingPrice" gorm:"comment:进货价"`
  8. Number int `json:"number" gorm:"comment:数量"`
  9. ManifestId int `json:"manifestId" gorm:"comment:货单id"`
  10. }
  11. func (Cargo) TableName() string {
  12. return "cargo"
  13. }