package entities import ( "time" "gorm.io/gorm" ) type ExpenseRealization struct { Id uint64 `gorm:"primaryKey;autoIncrement"` ExpenseNonstockId *uint64 `gorm:""` RealizationQty float64 `gorm:"type:numeric(15,3);not null"` RealizationUnitPrice float64 `gorm:"type:numeric(15,3);not null"` RealizationTotalPrice float64 `gorm:"type:numeric(15,3);not null"` RealizationDate time.Time `gorm:"type:date;not null"` Note *string `gorm:"type:text"` CreatedBy *uint64 `gorm:""` CreatedAt time.Time `gorm:"autoCreateTime"` UpdatedAt time.Time `gorm:"autoUpdateTime"` DeletedAt gorm.DeletedAt `gorm:"index" json:"-"` // Relations ExpenseNonstock *ExpenseNonstock `gorm:"foreignKey:ExpenseNonstockId;references:Id"` CreatedUser *User `gorm:"foreignKey:CreatedBy;references:Id"` }