Initial
This commit is contained in:
23
app/repository/dao.go
Normal file
23
app/repository/dao.go
Normal file
@ -0,0 +1,23 @@
|
||||
package repository
|
||||
|
||||
import "gorm.io/gorm"
|
||||
|
||||
type DAO struct {
|
||||
db *gorm.DB
|
||||
ApiKeysRepository *ApiKeysRepository
|
||||
CertRepository *CertRepository
|
||||
CompanyRepository *CompanyRepository
|
||||
FiskLogRepository *FiskLogRepository
|
||||
}
|
||||
|
||||
var Dao DAO
|
||||
|
||||
func CreateDAO(db *gorm.DB) DAO {
|
||||
return DAO{
|
||||
db: db,
|
||||
ApiKeysRepository: CreateApiKeysRepository(db),
|
||||
CertRepository: CreateCertRepository(db),
|
||||
CompanyRepository: CreateCompanyRepository(db),
|
||||
FiskLogRepository: CreateFiskLogRepository(db),
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user