Files
b2b/app/service/currencyService/currencyService.go
2026-04-17 15:15:28 +02:00

32 lines
802 B
Go

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) 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)
}
func New() *CurrencyService {
repo := currencyRepo.New()
return &CurrencyService{
repo: repo,
}
}