package model import ( pasturePb "gitee.com/xuyiping_admin/go_proto/proto/go/backend/cow" ) type NeckRingEstrus struct { Id int64 `json:"id"` PastureId int64 `json:"pastureId"` CowId int64 `json:"cowId"` NeckRingNumber string `json:"neckRingNumber"` EarNumber string `json:"earNumber"` Lact int32 `json:"lact"` FirstTime string `json:"firstTime"` LastTime string `json:"lastTime"` ActiveTime string `json:"activeTime"` ActiveLevel pasturePb.EstrusLevel_Kind `json:"activeLevel"` IsPeak pasturePb.IsShow_Kind `json:"isPeak"` DayHigh int32 `json:"dayHigh"` MaxHigh int32 `json:"maxHigh"` MaxCft float32 `json:"maxCft"` CheckResult pasturePb.CheckResult_Kind `json:"checkResult"` CheckAt int64 `json:"checkAt"` IsShow pasturePb.IsShow_Kind `json:"isShow"` CreatedAt int64 `json:"createdAt"` UpdatedAt int64 `json:"updatedAt"` } func (n *NeckRingEstrus) TableName() string { return "neck_ring_estrus" } func NewNeckRingEstrus(pastureId int64, cow *Cow, level pasturePb.EstrusLevel_Kind, maxCft float32, checkResult pasturePb.CheckResult_Kind, isShow pasturePb.IsShow_Kind) *NeckRingEstrus { return &NeckRingEstrus{ PastureId: pastureId, CowId: cow.Id, NeckRingNumber: cow.NeckRingNumber, EarNumber: cow.EarNumber, Lact: cow.Lact, ActiveLevel: level, IsShow: isShow, CheckResult: checkResult, MaxCft: maxCft, } } type GroupEstrusData struct { CowId int64 PastureId int64 EarNumber string NeckRingNumber string Records []*NeckRingEstrus Moved bool }