Feat[BE-261,265]: createing BOP and BOP realization(Unfinished)

This commit is contained in:
aguhh18
2025-11-19 16:05:11 +07:00
parent a57ef82ebb
commit 105b20c333
18 changed files with 1279 additions and 115 deletions
+2 -2
View File
@@ -9,10 +9,10 @@ import (
type Expense struct {
Id uint64 `gorm:"primaryKey;autoIncrement"`
ReferenceNumber *string `gorm:"type:varchar(50)"`
ReferenceNumber *string `gorm:"type:varchar(50);uniqueIndex"`
SupplierId *uint64 `gorm:""`
Category string `gorm:"type:varchar(50);not null"`
PoNumber string `gorm:"uniqueIndex;not null;type:varchar(50)"`
PoNumber *string `gorm:"type:varchar(50)"`
DocumentPath sql.NullString `gorm:"type:json"`
ExpenseDate time.Time `gorm:"type:date;not null"`
GrandTotal float64 `gorm:"type:numeric(15,3);default:0"`
+1 -1
View File
@@ -23,5 +23,5 @@ type ExpenseNonstock struct {
Expense *Expense `gorm:"foreignKey:ExpenseId;references:Id"`
ProjectFlockKandang *ProjectFlockKandang `gorm:"foreignKey:ProjectFlockKandangId;references:Id"`
Nonstock *Nonstock `gorm:"foreignKey:NonstockId;references:Id"`
Realizations []ExpenseRealization `gorm:"foreignKey:ExpenseNonstockId;references:Id"`
Realization *ExpenseRealization `gorm:"foreignKey:ExpenseNonstockId;references:Id"`
}