package models import ( "main/configs" "time" ) type Tag struct { ID int `json:"id" gorm:"primary_key"` Name string `json:"name"` CreatedAt time.Time `json:"created_at" gorm:"autoCreateTime"` UpdatedAt time.Time `json:"updated_at" gorm:"autoUpdateTime"` } func init() { configs.ORMDB().AutoMigrate(&Tag{}) }