same_time_cow.go 740 B

123456789101112131415161718192021222324252627
  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.IsShow_Kind `json:"status"`
  11. StartAt int64 `json:"startAt"`
  12. EndAt int64 `json:"endAt"`
  13. CreatedAt int64 `json:"createdAt"`
  14. UpdatedAt int64 `json:"updatedAt"`
  15. }
  16. func NewSameTimeCow(cowId, sameTimeId int64) *SameTimeCow {
  17. return &SameTimeCow{
  18. CowId: cowId,
  19. SameTimeId: sameTimeId,
  20. Status: pasturePb.IsShow_Ok,
  21. StartAt: time.Now().Unix(),
  22. }
  23. }