使用 gorm
This commit is contained in:
@@ -140,6 +140,11 @@ type Category struct {
|
||||
ArticleNum int
|
||||
}
|
||||
|
||||
// TableName 方法用于自定义表名
|
||||
func (Category) TableName() string {
|
||||
return "web_article_category"
|
||||
}
|
||||
|
||||
// 输入配置
|
||||
type ConfigMysql struct {
|
||||
Host string
|
||||
|
Reference in New Issue
Block a user