mirror of
https://gitlab.com/mbugroup/lti-api.git
synced 2026-05-24 15:25:43 +00:00
29 lines
841 B
Go
29 lines
841 B
Go
package repository
|
|
|
|
import (
|
|
"context"
|
|
|
|
"gitlab.com/mbugroup/lti-api.git/internal/common/repository"
|
|
entity "gitlab.com/mbugroup/lti-api.git/internal/entities"
|
|
"gorm.io/gorm"
|
|
)
|
|
|
|
type ExpenseRealizationRepository interface {
|
|
repository.BaseRepository[entity.ExpenseRealization]
|
|
IdExists(ctx context.Context, id uint64) (bool, error)
|
|
}
|
|
|
|
type ExpenseRealizationRepositoryImpl struct {
|
|
*repository.BaseRepositoryImpl[entity.ExpenseRealization]
|
|
}
|
|
|
|
func NewExpenseRealizationRepository(db *gorm.DB) ExpenseRealizationRepository {
|
|
return &ExpenseRealizationRepositoryImpl{
|
|
BaseRepositoryImpl: repository.NewBaseRepository[entity.ExpenseRealization](db),
|
|
}
|
|
}
|
|
|
|
func (r *ExpenseRealizationRepositoryImpl) IdExists(ctx context.Context, id uint64) (bool, error) {
|
|
return repository.Exists[entity.ExpenseRealization](ctx, r.DB(), uint(id))
|
|
}
|