same_time_cow.go 1012 B

1234567891011121314151617181920212223242526272829
  1. package model
  2. import (
  3. "time"
  4. pasturePb "gitee.com/xuyiping_admin/go_proto/proto/go/backend/cow"
  5. )
  6. type SameTimeCow struct {
  7. Id int64 `json:"id"`
  8. CowId int64 `json:"cowId"`
  9. SameTimeId int64 `json:"sameTimeId"`
  10. Status pasturePb.SameTimeStatus_Kind `json:"status"`
  11. NextSameTimeType pasturePb.SameTimeType_Kind `json:"nextSameTimeType"`
  12. NextSameTimeAt int64 `json:"nextSameTimeAt"`
  13. StartAt int64 `json:"startAt"`
  14. EndAt int64 `json:"endAt"`
  15. CreatedAt int64 `json:"createdAt"`
  16. UpdatedAt int64 `json:"updatedAt"`
  17. }
  18. func NewSameTimeCow(cowId, sameTimeId int64) *SameTimeCow {
  19. return &SameTimeCow{
  20. CowId: cowId,
  21. SameTimeId: sameTimeId,
  22. Status: pasturePb.SameTimeStatus_No_Start,
  23. StartAt: time.Now().Unix(),
  24. }
  25. }