You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
534 B
26 lines
534 B
2 years ago
|
package dorm
|
||
|
|
||
|
import (
|
||
|
"gorm.io/gen"
|
||
|
"gorm.io/gorm"
|
||
|
)
|
||
|
|
||
|
// GormGenClientFun *GormClient 驱动
|
||
|
type GormGenClientFun func() *GormGenClient
|
||
|
|
||
|
// GormGenClientTableFun *GormClient 驱动
|
||
|
// string 表名
|
||
|
type GormGenClientTableFun func() (*GormGenClient, string)
|
||
|
|
||
|
type GormGenClientConfig struct {
|
||
|
Dns string // 地址
|
||
|
}
|
||
|
|
||
|
// GormGenClient
|
||
|
// https://gorm.io/zh_CN/gen/index.html
|
||
|
type GormGenClient struct {
|
||
|
Db *gorm.DB // 驱动
|
||
|
Generator *gen.Generator // 驱动
|
||
|
config *GormGenClientConfig // 配置
|
||
|
}
|