neck_ring_bar_change.go 1001 B

123456789101112131415161718192021222324252627282930313233
  1. package model
  2. type NeckRingBarChange struct {
  3. Id int64 `json:"id"`
  4. PastureId int64 `json:"pastureId"`
  5. NeckRingNumber string `json:"neckRingNumber"`
  6. HeatDate string `json:"heatDate"`
  7. FrameId int32 `json:"frameId"`
  8. PenId int32 `json:"penId"`
  9. PenName string `json:"penName"`
  10. Nb int32 `json:"nb"`
  11. ChangeHigh int32 `json:"changeHigh"`
  12. ChangeFilter int32 `json:"changeFilter"`
  13. CreatedAt int64 `json:"createdAt"`
  14. UpdatedAt int64 `json:"updatedAt"`
  15. }
  16. func (n *NeckRingBarChange) TableName() string {
  17. return "neck_ring_bar_change"
  18. }
  19. func NewNeckRingBarChange(neckRingNumber, heatDate string, frameId, nb, changeHigh, changeFilter int32, pen *Pen) *NeckRingBarChange {
  20. return &NeckRingBarChange{
  21. PastureId: pen.PastureId,
  22. HeatDate: heatDate,
  23. FrameId: frameId,
  24. PenId: pen.Id,
  25. PenName: pen.Name,
  26. ChangeHigh: changeHigh,
  27. ChangeFilter: changeFilter,
  28. Nb: nb,
  29. }
  30. }