feed_formula_edit_record.go 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. package model
  2. import operationPb "gitee.com/xuyiping_admin/go_proto/proto/go/backend/operation"
  3. type FeedFormulaEditRecord struct {
  4. Id int64 `json:"id"`
  5. GroupId int64 `json:"group_id"`
  6. FeedFormulaId int64 `json:"feed_formula_id"`
  7. PastureId int64 `json:"pasture_id"`
  8. PastureName string `json:"pasture_name"`
  9. OperationName string `json:"operation_name"`
  10. ForageName string `json:"forage_name"`
  11. FieldName string `json:"field_name"`
  12. Status operationPb.FeedFormulaEditRecordType_Kind `json:"status"`
  13. BeforeValue string `json:"before_value"`
  14. AfterValue string `json:"after_value"`
  15. CreatedAt int64 `json:"created_at"`
  16. UpdatedAt int64 `json:"updated_at"`
  17. }
  18. func (f *FeedFormulaEditRecord) TableName() string {
  19. return "feed_formula_edit_record"
  20. }
  21. func NewFeedFormulaEditRecord(groupId, feedFormulaId, pastureId int64, pastureName, operationName, forageName, fieldName,
  22. beforeValue, afterValue string, status operationPb.FeedFormulaEditRecordType_Kind) *FeedFormulaEditRecord {
  23. return &FeedFormulaEditRecord{
  24. GroupId: groupId,
  25. FeedFormulaId: feedFormulaId,
  26. PastureId: pastureId,
  27. PastureName: pastureName,
  28. OperationName: operationName,
  29. ForageName: forageName,
  30. FieldName: fieldName,
  31. Status: status,
  32. BeforeValue: beforeValue,
  33. AfterValue: afterValue,
  34. }
  35. }