mirror of
https://gitlab.com/mbugroup/lti-api.git
synced 2026-05-22 06:15:44 +00:00
Merge branch 'dev/fifo-v2' into 'development'
Implement delete transfer to laying, chickin, and stock adjustment See merge request mbugroup/lti-api!371
This commit is contained in:
@@ -5,6 +5,7 @@ import "time"
|
||||
type AdjustmentStock struct {
|
||||
Id uint `gorm:"primaryKey"`
|
||||
ProductWarehouseId uint `gorm:"column:product_warehouse_id;not null"`
|
||||
PairedAdjustmentId *uint `gorm:"column:paired_adjustment_id"`
|
||||
TransactionType string `gorm:"column:transaction_type;type:varchar(100);not null;default:LEGACY"`
|
||||
FunctionCode string `gorm:"column:function_code;type:varchar(64)"`
|
||||
TotalQty float64 `gorm:"column:total_qty;default:0"`
|
||||
@@ -18,5 +19,6 @@ type AdjustmentStock struct {
|
||||
AdjNumber string `gorm:"column:adj_number;uniqueIndex;not null"`
|
||||
|
||||
ProductWarehouse *ProductWarehouse `gorm:"foreignKey:ProductWarehouseId;references:Id"`
|
||||
PairedAdjustment *AdjustmentStock `gorm:"foreignKey:PairedAdjustmentId;references:Id"`
|
||||
StockLog *StockLog `gorm:"polymorphic:Loggable;polymorphicType:LoggableType;polymorphicId:LoggableId;polymorphicValue:ADJUSTMENT"`
|
||||
}
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
package entities
|
||||
|
||||
type ProductWarehouse struct {
|
||||
Id uint `gorm:"primaryKey;column:id"`
|
||||
ProductId uint `gorm:"column:product_id;not null"`
|
||||
WarehouseId uint `gorm:"column:warehouse_id;not null"`
|
||||
ProjectFlockKandangId *uint `gorm:"column:project_flock_kandang_id"`
|
||||
Quantity float64 `gorm:"column:qty;type:numeric(15,3);default:0"`
|
||||
Id uint `gorm:"primaryKey;column:id"`
|
||||
ProductId uint `gorm:"column:product_id;not null"`
|
||||
WarehouseId uint `gorm:"column:warehouse_id;not null"`
|
||||
ProjectFlockKandangId *uint `gorm:"column:project_flock_kandang_id"`
|
||||
Quantity float64 `gorm:"column:qty;type:numeric(15,3);default:0"`
|
||||
AvailableQty *float64 `gorm:"-"`
|
||||
|
||||
// Relations
|
||||
Product Product `gorm:"foreignKey:ProductId;references:Id"`
|
||||
|
||||
@@ -45,4 +45,6 @@ type Recording struct {
|
||||
StandardFcr *float64 `gorm:"-"`
|
||||
PopulationCanChange *bool `gorm:"-"`
|
||||
TransferExecuted *bool `gorm:"-"`
|
||||
IsTransition *bool `gorm:"-"`
|
||||
IsLaying *bool `gorm:"-"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user