package entities

type RecordingDepletion struct {
	Id                          uint    `gorm:"primaryKey"`
	RecordingId                 uint    `gorm:"column:recording_id;not null;index"`
	ProductWarehouseId          uint    `gorm:"column:product_warehouse_id;not null"`
	SourceProductWarehouseId    *uint   `gorm:"column:source_product_warehouse_id"`
	SourceProjectFlockKandangId *uint   `gorm:"column:source_project_flock_kandang_id"`
	Qty                         float64 `gorm:"column:qty;not null"`
	UsageQty                    float64 `gorm:"column:usage_qty"`
	PendingQty                  float64 `gorm:"column:pending_qty"`

	Recording                 Recording            `gorm:"foreignKey:RecordingId;references:Id"`
	ProductWarehouse          ProductWarehouse     `gorm:"foreignKey:ProductWarehouseId;references:Id"`
	SourceProjectFlockKandang *ProjectFlockKandang `gorm:"foreignKey:SourceProjectFlockKandangId;references:Id"`
}
