| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- package model
- import (
- pasturePb "gitee.com/xuyiping_admin/go_proto/proto/go/backend/cow"
- )
- type SameTimeCowDetail struct {
- Id int64 `json:"id"`
- CowId int64 `json:"cowId"`
- Lact int32 `json:"lact"`
- PenId int64 `json:"penId"`
- SameTimeId int64 `json:"sameTimeId"`
- SameTimeType pasturePb.SameTimeType_Kind `json:"sameTimeType"`
- PlanDay string `json:"planDay"`
- EndDay string `json:"endDay"`
- RealityDay string `json:"realityDay"`
- Status pasturePb.IsShow_Kind `json:"status"`
- DrugsId int64 `json:"drugsId"`
- Unit pasturePb.Unit_Kind `json:"unit"`
- Usage int32 `json:"usage"`
- OperationId int64 `json:"operationId"`
- OperationName string `json:"operationName"`
- CreatedAt int64 `json:"createdAt"`
- UpdatedAt int64 `json:"updatedAt"`
- }
- func (s *SameTimeCowDetail) TableName() string {
- return "same_time_cow_detail"
- }
- func NewSameTimeCowDetailList(cowList []*Cow, sameTimeId int64, planTime string, sameTimeType pasturePb.SameTimeType_Kind) []*SameTimeCowDetail {
- res := make([]*SameTimeCowDetail, len(cowList))
- for i, cow := range cowList {
- res[i] = &SameTimeCowDetail{
- CowId: cow.Id,
- Lact: cow.Lact,
- PenId: cow.PenId,
- SameTimeId: sameTimeId,
- SameTimeType: sameTimeType,
- Status: pasturePb.IsShow_No,
- PlanDay: planTime,
- EndDay: planTime,
- }
- }
- return res
- }
- type SameTimeHeader struct {
- Id string `json:"id"`
- CowId string `json:"cowId"`
- BreedStatus string `json:"breedStatus"`
- PenName string `json:"penName"`
- Lact string `json:"lact"`
- CalvingAge string `json:"calvingAge"`
- AbortionAge string `json:"abortionAge"`
- DayAge string `json:"dayAge"`
- Status string `json:"status"`
- ExecType string `json:"execType"`
- }
- type SameTimeBody struct {
- Id int64 `json:"id"`
- CowId int64 `json:"cowId"`
- BreedStatus pasturePb.BreedStatus_Kind `json:"breedStatus"`
- PenName string `json:"penName"`
- Lact int32 `json:"lact"`
- CalvingAge int32 `json:"calvingAge"`
- AbortionAge int32 `json:"abortionAge"`
- DayAge int32 `json:"dayAge"`
- Status pasturePb.IsShow_Kind `json:"status"`
- ExecType string `json:"execType"` // todo 执行类型定义成枚举???
- }
|