1234567891011121314151617181920212223242526272829 |
- package model
- import (
- "time"
- pasturePb "gitee.com/xuyiping_admin/go_proto/proto/go/backend/cow"
- )
- type SameTimeCow struct {
- Id int64 `json:"id"`
- CowId int64 `json:"cowId"`
- SameTimeId int64 `json:"sameTimeId"`
- Status pasturePb.SameTimeStatus_Kind `json:"status"`
- NextSameTimeType pasturePb.SameTimeType_Kind `json:"nextSameTimeType"`
- NextSameTimeAt int64 `json:"nextSameTimeAt"`
- StartAt int64 `json:"startAt"`
- EndAt int64 `json:"endAt"`
- CreatedAt int64 `json:"createdAt"`
- UpdatedAt int64 `json:"updatedAt"`
- }
- func NewSameTimeCow(cowId, sameTimeId int64) *SameTimeCow {
- return &SameTimeCow{
- CowId: cowId,
- SameTimeId: sameTimeId,
- Status: pasturePb.SameTimeStatus_No_Start,
- StartAt: time.Now().Unix(),
- }
- }
|