package entities import ( "time" "gorm.io/gorm" ) type ProjectFlock struct { Id uint `gorm:"primaryKey"` FlockId uint `gorm:"not null"` AreaId uint `gorm:"not null"` ProductCategoryId uint `gorm:"not null"` FcrId uint `gorm:"not null"` LocationId uint `gorm:"not null"` Period int `gorm:"not null"` CreatedBy uint `gorm:"not null"` CreatedAt time.Time `gorm:"autoCreateTime"` UpdatedAt time.Time `gorm:"autoUpdateTime"` DeletedAt gorm.DeletedAt `gorm:"index" json:"-"` Flock Flock `gorm:"foreignKey:FlockId;references:Id"` Area Area `gorm:"foreignKey:AreaId;references:Id"` ProductCategory ProductCategory `gorm:"foreignKey:ProductCategoryId;references:Id"` Fcr Fcr `gorm:"foreignKey:FcrId;references:Id"` Location Location `gorm:"foreignKey:LocationId;references:Id"` CreatedUser User `gorm:"foreignKey:CreatedBy;references:Id"` Kandangs []Kandang `gorm:"foreignKey:ProjectFlockId;references:Id"` }