You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ims/app/models/outbound_item.go

25 lines
1.7 KiB

2 months ago
package models
import (
"time"
"gorm.io/gorm"
)
// OutboundItem 出库单明细
type OutboundItem struct {
ID uint `json:"id" gorm:"primarykey"` // 出库明细ID
OutboundID uint `json:"outbound_id"` // 所属出库单编号
ProductID uint `json:"product_id"` // 所属商品ID,特意设计的冗余字段
Product *Product `json:"product,omitempty" gorm:"foreignkey:ProductID"` // 出库产品
Batch string `json:"batch"` // 产品批次
WarehouseLocationID uint `json:"warehouse_location_id"` // 出库仓位编号
WarehouseLocation *WarehouseLocation `json:"warehouse_location" gorm:"foreignkey:WarehouseLocationID"` // 出库仓位
Amount int `json:"amount"` // 出库数量
CostPrice int `json:"cost_price"` // 成本单价
SellPrice int `json:"sell_price"` // 销售单价(含税)
CreatedAt time.Time `json:"create_time"` // 创建时间
UpdatedAt time.Time `json:"update_time"` // 上次操作时间
DeletedAt gorm.DeletedAt `json:"delete_time" gorm:"index"` // 删除数据的时间
}