mirror of
https://gitlab.com/mbugroup/lti-api.git
synced 2026-05-20 13:31:56 +00:00
24 lines
1.0 KiB
Go
24 lines
1.0 KiB
Go
package entities
|
|
|
|
import (
|
|
"time"
|
|
)
|
|
|
|
type ExpenseNonstock struct {
|
|
Id uint64 `gorm:"primaryKey;autoIncrement"`
|
|
ExpenseId *uint64 `gorm:""`
|
|
ProjectFlockKandangId *uint64 `gorm:""`
|
|
KandangId *uint64 `gorm:""`
|
|
NonstockId *uint64 `gorm:""`
|
|
Qty float64 `gorm:"type:numeric(15,3);not null"`
|
|
Price float64 `gorm:"type:numeric(15,3);not null;column:price"`
|
|
Notes string `gorm:"type:text;column:notes"`
|
|
CreatedAt time.Time `gorm:"type:timestamptz;default:CURRENT_TIMESTAMP"`
|
|
|
|
Expense *Expense `gorm:"foreignKey:ExpenseId;references:Id"`
|
|
ProjectFlockKandang *ProjectFlockKandang `gorm:"foreignKey:ProjectFlockKandangId;references:Id"`
|
|
Kandang *Kandang `gorm:"foreignKey:KandangId;references:Id"`
|
|
Nonstock *Nonstock `gorm:"foreignKey:NonstockId;references:Id"`
|
|
Realization *ExpenseRealization `gorm:"foreignKey:Id;references:ExpenseNonstockId"`
|
|
}
|