mirror of
https://gitlab.com/mbugroup/lti-api.git
synced 2026-05-20 13:31:56 +00:00
Feat(BE-36,37,38,39): master area, customer, kandang, location, warehouse
This commit is contained in:
@@ -1,22 +1,22 @@
|
||||
{{define "repository"}}package repository
|
||||
|
||||
import (
|
||||
model "gitlab.com/mbugroup/lti-api.git/internal/modules/{{Kebab .FeatName}}s/models"
|
||||
"gitlab.com/mbugroup/lti-api.git/internal/repository"
|
||||
entity "gitlab.com/mbugroup/lti-api.git/internal/entities"
|
||||
"gitlab.com/mbugroup/lti-api.git/internal/common/repository"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
type {{Pascal .Entity}}Repository interface {
|
||||
repository.BaseRepository[model.{{Pascal .Entity}}]
|
||||
repository.BaseRepository[entity.{{Pascal .Entity}}]
|
||||
}
|
||||
|
||||
type {{Pascal .Entity}}RepositoryImpl struct {
|
||||
*repository.BaseRepositoryImpl[model.{{Pascal .Entity}}]
|
||||
*repository.BaseRepositoryImpl[entity.{{Pascal .Entity}}]
|
||||
}
|
||||
|
||||
func New{{Pascal .Entity}}Repository(db *gorm.DB) {{Pascal .Entity}}Repository {
|
||||
return &{{Pascal .Entity}}RepositoryImpl{
|
||||
BaseRepositoryImpl: repository.NewBaseRepository[model.{{Pascal .Entity}}](db),
|
||||
BaseRepositoryImpl: repository.NewBaseRepository[entity.{{Pascal .Entity}}](db),
|
||||
}
|
||||
}
|
||||
{{end}}
|
||||
|
||||
Reference in New Issue
Block a user