package model type IndicatorsData struct { Id int64 `json:"id"` PastureId int64 `json:"pastureId"` Year string `json:"year"` Month string `json:"month"` Kind string `json:"kind"` Value string `json:"value"` CreatedAt int64 `json:"createdAt"` UpdatedAt int64 `json:"updatedAt"` } func (d *IndicatorsData) TableName() string { return "indicators_data" } func NewDataIndicators(pastureId int64, year, month, value, indicatorKind string) *IndicatorsData { return &IndicatorsData{ PastureId: pastureId, Year: year, Month: month, Kind: indicatorKind, Value: value, } }