3 Star 1 Fork 0

lzz/coupons

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
automigrate.go 364 Bytes
一键复制 编辑 原始数据 按行查看 历史
yhj 提交于 2024-10-01 20:07 +08:00 . feat: CreateCoupons
package automigrate
import (
"gitee.com/lzzandlyx/coupons/db/mysql"
"gitee.com/lzzandlyx/coupons/internal/svc"
"gitee.com/lzzandlyx/coupons/model"
"gorm.io/gorm"
)
func AutoMigrate(svc *svc.ServiceContext) error {
return mysql.WithMySQLClient(svc, func(db *gorm.DB) error {
return db.AutoMigrate(
new(model.Coupon),
new(model.CouponUser),
)
})
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/lzzandlyx/coupons.git
git@gitee.com:lzzandlyx/coupons.git
lzzandlyx
coupons
coupons
0a16eafb0ab5

搜索帮助