feat[BE-127]: Createing transfer laying create one, approvals, get one, get all, update, delete, but Still unfinished

This commit is contained in:
aguhh18
2025-11-05 08:56:18 +07:00
parent 3a5c49c511
commit 1ee97b91a5
13 changed files with 928 additions and 74 deletions
+3 -2
View File
@@ -12,7 +12,8 @@ type LayingTransfer struct {
FromProjectFlockId uint `gorm:"not null"`
ToProjectFlockId uint `gorm:"not null"`
TransferDate time.Time `gorm:"type:date;not null"`
TotalQty float64 `gorm:"type:numeric(15,3);not null"`
PendingUsageQty *float64 `gorm:"type:numeric(15,3)"`
UsageQty *float64 `gorm:"type:numeric(15,3)"`
Notes string `gorm:"type:text"`
CreatedBy uint `gorm:"not null"`
CreatedAt time.Time `gorm:"autoCreateTime"`
@@ -24,5 +25,5 @@ type LayingTransfer struct {
CreatedUser *User `gorm:"foreignKey:CreatedBy;references:Id"`
Sources []LayingTransferSource `gorm:"foreignKey:LayingTransferId;constraint:OnDelete:CASCADE"`
Targets []LayingTransferTarget `gorm:"foreignKey:LayingTransferId;constraint:OnDelete:CASCADE"`
LatestApproval *Approval `gorm:"-" json:"-"`
}