It looks like GORM doesn't have support for DATE type, the only way to define date is through time.Time :
type Header struct {
Start time.Time `json:"period_start"`
End time.Time `json:"period_end" `
CreatedAt time.Time `json:"created_at" sql:"DEFAULT:CURRENT_TIMESTAMP"`
CreatedBy string `json:"created_by"`
UpdatedAt time.Time `json:"updated_at" sql:"DEFAULT:CURRENT_TIMESTAMP"`
UpdatedBy string `json:"updated_by"`
}
So created table will have TIMESTAMP as a type. Is there a way around this? I tried sql:"DATE", it didn't work