3 Star 1 Fork 0

lzz/balance

Create your Gitee Account
Explore and code with more than 14 million developers,Free private repositories !:)
Sign up
文件
Clone or Download
automigrate.go 373 Bytes
Copy Edit Raw Blame History
yuanhaijun authored 2024-11-08 14:07 +08:00 . 余额提交
package automigrate
import (
"gitee.com/lzzandlyx/balance/db/mysql"
"gitee.com/lzzandlyx/balance/internal/svc"
"gitee.com/lzzandlyx/balance/model"
"gorm.io/gorm"
)
func AutoMigrate(svc *svc.ServiceContext) error {
return mysql.WithMySQLClient(svc, func(db *gorm.DB) error {
return db.AutoMigrate(
new(model.UserBalance),
new(model.UserBalanceLog),
)
})
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/lzzandlyx/balance.git
git@gitee.com:lzzandlyx/balance.git
lzzandlyx
balance
balance
57ed1a7d87d2

Search