12345678910111213141516171819202122232425262728293031323334353637383940 |
- package model
- type NeckRingHealthWarning struct {
- Id int64 `json:"id"`
- NeckRingHealthId int64 `json:"neckRingHealthId"`
- PastureId int64 `json:"pastureId"`
- CowId int64 `json:"cowId"`
- EarNumber string `json:"earNumber"`
- NeckRingNumber string `json:"neckRingNumber"`
- HeatDate string `json:"heatDate"`
- MinHigh int32 `json:"minHigh"`
- MinChew int32 `json:"minChew"`
- MinIntake int32 `json:"minIntake"`
- ChewSum int32 `json:"chewSum"`
- BeforeThreeSumChew int32 `json:"beforeThreeSumChew"`
- Score int32 `json:"score"`
- CreatedAt int64 `json:"created"`
- UpdatedAt int64 `json:"updated"`
- }
- func (n *NeckRingHealthWarning) TableName() string {
- return "neck_ring_health_warning"
- }
- func NewNeckRingHealthWarning(pastureId int64, neckRingHealth *NeckRingHealth, cow *Cow, newScore int32) *NeckRingHealthWarning {
- return &NeckRingHealthWarning{
- NeckRingHealthId: pastureId,
- PastureId: neckRingHealth.Id,
- CowId: cow.Id,
- EarNumber: cow.EarNumber,
- NeckRingNumber: cow.NeckRingNumber,
- HeatDate: "",
- MinHigh: neckRingHealth.MinHigh,
- MinChew: neckRingHealth.MinChew,
- MinIntake: neckRingHealth.MinInactive,
- ChewSum: neckRingHealth.SumChew,
- BeforeThreeSumChew: neckRingHealth.BeforeThreeSumChew,
- Score: newScore,
- }
- }
|