Files
gin-admin/internal/repository/repository.go
2025-10-24 10:07:42 +08:00

23 lines
291 B
Go

package repository
import (
"gorm.io/gorm"
)
// @Author: yv1ing
// @Email: me@yvling.cn
// @Date: 2025/8/28 14:34
// @Desc: 数据操作的抽象封装
type repository struct {
DB *gorm.DB
}
var Repo *repository
func SetupRepository(db *gorm.DB) {
Repo = &repository{
DB: db,
}
}