package model type DataIndicators struct { Id int64 `json:"id"` PastureId int64 `json:"pastureId"` DateTime string `json:"dateTime"` IndicatorKind string `json:"indicatorKind"` Name string `json:"name"` Value string `json:"value"` Remarks string `json:"remarks"` CreatedAt int64 `json:"createdAt"` UpdatedAt int64 `json:"updatedAt"` } func (d *DataIndicators) TableName() string { return "data_indicators" } func NewDataIndicators(pastureId int64, dataTime, value, remarks, indicatorKind, name string) *DataIndicators { return &DataIndicators{ PastureId: pastureId, DateTime: dataTime, IndicatorKind: indicatorKind, Name: name, Value: value, Remarks: remarks, } }