mirror of
https://gitlab.com/mbugroup/lti-api.git
synced 2026-05-20 13:31:56 +00:00
28 lines
1.1 KiB
Go
28 lines
1.1 KiB
Go
package entities
|
|
|
|
import (
|
|
"time"
|
|
|
|
"gorm.io/gorm"
|
|
)
|
|
|
|
type ExpenseNonstock struct {
|
|
Id uint64 `gorm:"primaryKey;autoIncrement"`
|
|
ExpenseId *uint64 `gorm:""`
|
|
ProjectFlockKandangId *uint64 `gorm:""`
|
|
NonstockId *uint64 `gorm:""`
|
|
Qty float64 `gorm:"type:numeric(15,3);not null"`
|
|
UnitPrice float64 `gorm:"type:numeric(15,3);not null"`
|
|
TotalPrice float64 `gorm:"type:numeric(15,3);not null"`
|
|
Note *string `gorm:"type:text"`
|
|
CreatedAt time.Time `gorm:"autoCreateTime"`
|
|
UpdatedAt time.Time `gorm:"autoUpdateTime"`
|
|
DeletedAt gorm.DeletedAt `gorm:"index" json:"-"`
|
|
|
|
// Relations
|
|
Expense *Expense `gorm:"foreignKey:ExpenseId;references:Id"`
|
|
ProjectFlockKandang *ProjectFlockKandang `gorm:"foreignKey:ProjectFlockKandangId;references:Id"`
|
|
Nonstock *Nonstock `gorm:"foreignKey:NonstockId;references:Id"`
|
|
Realization *ExpenseRealization `gorm:"foreignKey:ExpenseNonstockId;references:Id"`
|
|
}
|