Initial commit (code only without large binaries)
This commit is contained in:
28
EdgeAPI/internal/db/models/ad_package_price_dao.go
Normal file
28
EdgeAPI/internal/db/models/ad_package_price_dao.go
Normal file
@@ -0,0 +1,28 @@
|
||||
package models
|
||||
|
||||
import (
|
||||
_ "github.com/go-sql-driver/mysql"
|
||||
"github.com/iwind/TeaGo/Tea"
|
||||
"github.com/iwind/TeaGo/dbs"
|
||||
)
|
||||
|
||||
type ADPackagePriceDAO dbs.DAO
|
||||
|
||||
func NewADPackagePriceDAO() *ADPackagePriceDAO {
|
||||
return dbs.NewDAO(&ADPackagePriceDAO{
|
||||
DAOObject: dbs.DAOObject{
|
||||
DB: Tea.Env,
|
||||
Table: "edgeADPackagePrices",
|
||||
Model: new(ADPackagePrice),
|
||||
PkName: "id",
|
||||
},
|
||||
}).(*ADPackagePriceDAO)
|
||||
}
|
||||
|
||||
var SharedADPackagePriceDAO *ADPackagePriceDAO
|
||||
|
||||
func init() {
|
||||
dbs.OnReady(func() {
|
||||
SharedADPackagePriceDAO = NewADPackagePriceDAO()
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user