package model import "time" type TradeCalendar struct { CalDate time.Time `gorm:"column:cal_date;primaryKey"` Exchange string `gorm:"column:exchange;primaryKey"` IsOpen int `gorm:"column:is_open"` PretradeDate time.Time `gorm:"column:pretrade_date"` } func (TradeCalendar) TableName() string { return "trade_calendar" } type CalendarResponse struct { OpenDates []string `json:"open_dates"` MaxDate string `json:"max_date"` }