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.
backend/internal/profession/repository.go

24 lines
729 B
Go
Raw Normal View History

package profession
import (
"context"
2022-09-20 16:46:47 +00:00
"gitea.dwysokinski.me/zdam-egzamin-zawodowy/backend/internal/model"
)
type FetchConfig struct {
2021-07-14 04:58:10 +00:00
Filter *model.ProfessionFilter
Offset int
Limit int
Sort []string
Count bool
}
type Repository interface {
2021-07-14 04:58:10 +00:00
Store(ctx context.Context, input *model.ProfessionInput) (*model.Profession, error)
UpdateMany(ctx context.Context, f *model.ProfessionFilter, input *model.ProfessionInput) ([]*model.Profession, error)
Delete(ctx context.Context, f *model.ProfessionFilter) ([]*model.Profession, error)
Fetch(ctx context.Context, cfg *FetchConfig) ([]*model.Profession, int, error)
GetAssociatedQualifications(ctx context.Context, ids ...int) (map[int][]*model.Qualification, error)
}