package entities import ( "time" ) 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:""` // Relations ExpenseNonstock *ExpenseNonstock `gorm:"foreignKey:ExpenseNonstockId;references:Id"` CreatedUser *User `gorm:"foreignKey:CreatedBy;references:Id"` }