cargo.go 915 B

123456789101112131415161718192021
  1. package godown
  2. import "server/global"
  3. type Cargo struct {
  4. global.GVA_MODEL
  5. CommodityId int `json:"commodityId" gorm:"comment:商品id"`
  6. Commodity Commodity `json:"commodity" gorm:"foreignKey:CommodityId;references:id;"`
  7. Number int `json:"number" gorm:"comment:数量"`
  8. ManifestId int `json:"manifestId" gorm:"comment:货单id"`
  9. WarehouseId int `json:"warehouseId" gorm:"comment:仓库id"`
  10. Warehouse Warehouse `json:"warehouse" gorm:"foreignKey:WarehouseId;references:id;"`
  11. StorageAreaId int `json:"storageAreaId" gorm:"comment:库区id"`
  12. StorageArea StorageArea `json:"storageArea" gorm:"foreignKey:StorageAreaId;references:id;"`
  13. PlaceId int `json:"placeId" gorm:"comment:库位id"`
  14. Place Place `json:"place" gorm:"foreignKey:PlaceId;references:id;"`
  15. }
  16. func (Cargo) TableName() string {
  17. return "cargo"
  18. }