A:数据库初始化,并增加User表示例

This commit is contained in:
jimmy committed 2025-06-15 17:37:31 +08:00
1 parent da2222f2d9
commit b8dc199cff
15 files changed
+1459 -108

No files matched your search

+12
View File
@@ -0,0 +1,12 @@
package db
import (
"rear/internal/model"
)
func AutoMigrate() error {
return DB.AutoMigrate(
&model.User{},
// 在这里添加其他模型
)
}