package entities import ( "time" "gorm.io/gorm" ) type ProjectFlockPopulation struct { Id uint `gorm:"primaryKey"` ProjectFlockKandangId uint `gorm:"not null;index;constraint:OnUpdate:CASCADE,OnDelete:CASCADE"` InitialQuantity float64 `gorm:"type:numeric(15,3);not null"` CurrentQuantity float64 `gorm:"type:numeric(15,3);not null"` ReservedQuantity float64 `gorm:"type:numeric(15,3)"` CreatedBy uint `gorm:"not null"` CreatedAt time.Time `gorm:"autoCreateTime"` UpdatedAt time.Time `gorm:"autoUpdateTime"` DeletedAt gorm.DeletedAt `gorm:"index"` ProjectFlockKandang *ProjectFlockKandang `gorm:"foreignKey:ProjectFlockKandangId;references:Id"` CreatedUser *User `gorm:"foreignKey:CreatedBy;references:Id"` }