pasture_data_log.go 639 B

1234567891011121314151617181920212223242526
  1. package model
  2. type PastureDataLog struct {
  3. Id int64 `json:"id"`
  4. LogType int32 `json:"log_type"`
  5. PastureId int64 `json:"pasture_id"`
  6. Body string `json:"body"`
  7. Url string `json:"url"`
  8. Response string `json:"response"`
  9. CreatedAt int64 `json:"created_at"`
  10. UpdatedAt int64 `json:"updated_at"`
  11. }
  12. func (p *PastureDataLog) TableName() string {
  13. return "pasture_data_log"
  14. }
  15. func NewPastureDataLog(pastureId int64, logType int32, url, body, response string) *PastureDataLog {
  16. return &PastureDataLog{
  17. LogType: logType,
  18. PastureId: pastureId,
  19. Body: body,
  20. Url: url,
  21. Response: response,
  22. }
  23. }