feat: add list of currencies

This commit is contained in:
2026-04-17 15:12:41 +02:00
parent ec44200332
commit 93a7dd1718
10 changed files with 102 additions and 35 deletions

View File

@@ -3,16 +3,22 @@ package currencyService
import (
"git.ma-al.com/goc_daniel/b2b/app/model"
"git.ma-al.com/goc_daniel/b2b/app/repos/currencyRepo"
"git.ma-al.com/goc_daniel/b2b/app/utils/query/filters"
"git.ma-al.com/goc_daniel/b2b/app/utils/query/find"
)
type CurrencyService struct {
repo currencyRepo.UICurrencyRepo
}
func (s *CurrencyService) GetCurrency(id uint) (*model.Currency, error) {
func (s *CurrencyService) Get(id uint) (*model.Currency, error) {
return s.repo.Get(id)
}
func (s *CurrencyService) Find(langId uint, p find.Paging, filt *filters.FiltersList) (*find.Found[model.Currency], error) {
return s.repo.Find(langId, p, filt)
}
func (s *CurrencyService) CreateCurrencyRate(currency *model.CurrencyRate) error {
return s.repo.CreateConversionRate(currency)
}