package models import ( "time" "gorm.io/gorm" ) type Provider struct { ID uint `json:"id" gorm:"primaryKey"` Name string `json:"name" gorm:"not null"` Icon string `json:"icon"` CreatedAt time.Time `json:"created_at" gorm:"autoCreateTime"` UpdatedAt time.Time `json:"updated_at" gorm:"autoUpdateTime"` CreatedBy string `json:"created_by" gorm:"not null"` DeletedAt gorm.DeletedAt `json:"-" gorm:"index"` } // TableName 指定表名 func (Provider) TableName() string { return "provider" }