mirror of
https://gitlab.com/mbugroup/lti-api.git
synced 2026-05-20 13:31:56 +00:00
23 lines
625 B
Cheetah
23 lines
625 B
Cheetah
{{define "repository"}}package repository
|
|
|
|
import (
|
|
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[entity.{{Pascal .Entity}}]
|
|
}
|
|
|
|
type {{Pascal .Entity}}RepositoryImpl struct {
|
|
*repository.BaseRepositoryImpl[entity.{{Pascal .Entity}}]
|
|
}
|
|
|
|
func New{{Pascal .Entity}}Repository(db *gorm.DB) {{Pascal .Entity}}Repository {
|
|
return &{{Pascal .Entity}}RepositoryImpl{
|
|
BaseRepositoryImpl: repository.NewBaseRepository[entity.{{Pascal .Entity}}](db),
|
|
}
|
|
}
|
|
{{end}}
|