package model import pasturePb "gitee.com/xuyiping_admin/go_proto/proto/go/backend/cow" type FrozenSemenLog struct { Id int64 `json:"id"` BullId string `json:"bullId"` CowIds string `json:"cowId"` Quantity int32 `json:"quantity"` MatingAt int64 `json:"matingAt"` OperationId int64 `json:"operationId"` OperationName string `json:"operationName"` Remarks string `json:"remarks"` CreatedAt int64 `json:"createdAt"` UpdatedAt int64 `json:"updatedAt"` } func (e *FrozenSemenLog) TableName() string { return "frozen_semen_log" } func NewEventFrozenSemenLog(req *pasturePb.EventMating) *FrozenSemenLog { return &FrozenSemenLog{ BullId: req.FrozenSemenNumber, CowIds: req.CowIds, OperationId: int64(req.OperationId), OperationName: req.OperationName, Quantity: req.FrozenSemenCount, MatingAt: int64(req.MatingAt), Remarks: req.Remarks, } }