使用 gorm

This commit is contained in:
2024-11-04 01:39:18 +08:00
parent 3020481eca
commit 7f4de71495
4 changed files with 53 additions and 30 deletions

View File

@@ -140,6 +140,11 @@ type Category struct {
ArticleNum int
}
// TableName 方法用于自定义表名
func (Category) TableName() string {
return "web_article_category"
}
// 输入配置
type ConfigMysql struct {
Host string