mirror of
https://gitlab.com/mbugroup/lti-api.git
synced 2026-05-20 21:41:55 +00:00
36 lines
1.8 KiB
Go
36 lines
1.8 KiB
Go
package entities
|
|
|
|
import (
|
|
"time"
|
|
|
|
"gorm.io/gorm"
|
|
)
|
|
|
|
type Recording struct {
|
|
Id uint `gorm:"primaryKey"`
|
|
ProjectFlockKandangId uint `gorm:"column:project_flock_id;not null;index"`
|
|
RecordDatetime time.Time `gorm:"column:record_datetime;not null"`
|
|
RecordDate *time.Time `gorm:"column:record_date"`
|
|
Ontime int `gorm:"column:ontime;not null;default:0"`
|
|
Day *int `gorm:"column:day"`
|
|
TotalDepletion *int `gorm:"column:total_depletion"`
|
|
CumDepletionRate *float64 `gorm:"column:cum_depletion_rate"`
|
|
DailyGain *float64 `gorm:"column:daily_gain"`
|
|
AvgDailyGain *float64 `gorm:"column:avg_daily_gain"`
|
|
CumIntake *int64 `gorm:"column:cum_intake"`
|
|
FcrValue *float64 `gorm:"column:fcr_value"`
|
|
TotalChick *int64 `gorm:"column:total_chick"`
|
|
DailyDepletionRate *float64 `gorm:"column:daily_depletion_rate"`
|
|
CumDepletion *int `gorm:"column:cum_depletion"`
|
|
CreatedBy uint `gorm:"column:created_by"`
|
|
CreatedAt time.Time `gorm:"autoCreateTime"`
|
|
UpdatedAt time.Time `gorm:"autoUpdateTime"`
|
|
DeletedAt gorm.DeletedAt `gorm:"index" json:"-"`
|
|
|
|
ProjectFlockKandang *ProjectFlockKandang `gorm:"foreignKey:ProjectFlockKandangId;references:Id"`
|
|
CreatedUser *User `gorm:"foreignKey:CreatedBy;references:Id"`
|
|
BodyWeights []RecordingBW `gorm:"foreignKey:RecordingId;references:Id"`
|
|
Depletions []RecordingDepletion `gorm:"foreignKey:RecordingId;references:Id"`
|
|
Stocks []RecordingStock `gorm:"foreignKey:RecordingId;references:Id"`
|
|
}
|