This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
2021-02-27 13:46:00 +00:00
|
|
|
package qualification
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
|
2022-09-20 16:46:47 +00:00
|
|
|
"gitea.dwysokinski.me/zdam-egzamin-zawodowy/backend/internal/model"
|
2021-02-27 13:46:00 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
type FetchConfig struct {
|
2021-07-14 04:58:10 +00:00
|
|
|
Filter *model.QualificationFilter
|
2021-02-27 13:46:00 +00:00
|
|
|
Offset int
|
|
|
|
Limit int
|
|
|
|
Sort []string
|
|
|
|
Count bool
|
|
|
|
}
|
|
|
|
|
2021-03-27 15:03:43 +00:00
|
|
|
type GetSimilarConfig struct {
|
|
|
|
Limit int
|
|
|
|
Offset int
|
|
|
|
QualificationID int
|
|
|
|
Sort []string
|
|
|
|
Count bool
|
|
|
|
}
|
|
|
|
|
2021-02-27 13:46:00 +00:00
|
|
|
type Repository interface {
|
2021-07-14 04:58:10 +00:00
|
|
|
Store(ctx context.Context, input *model.QualificationInput) (*model.Qualification, error)
|
|
|
|
UpdateMany(ctx context.Context, f *model.QualificationFilter, input *model.QualificationInput) ([]*model.Qualification, error)
|
|
|
|
Delete(ctx context.Context, f *model.QualificationFilter) ([]*model.Qualification, error)
|
|
|
|
Fetch(ctx context.Context, cfg *FetchConfig) ([]*model.Qualification, int, error)
|
|
|
|
GetSimilar(ctx context.Context, cfg *GetSimilarConfig) ([]*model.Qualification, int, error)
|
2021-02-27 13:46:00 +00:00
|
|
|
}
|