package customerService

import (
	"git.ma-al.com/goc_daniel/b2b/app/model"
	"git.ma-al.com/goc_daniel/b2b/app/repos/customerRepo"
	"git.ma-al.com/goc_daniel/b2b/app/utils/query/filters"
	"git.ma-al.com/goc_daniel/b2b/app/utils/query/find"
)

type CustomerService struct {
	repo customerRepo.UICustomerRepo
}

func New() *CustomerService {
	return &CustomerService{
		repo: customerRepo.New(),
	}
}

func (s *CustomerService) GetById(id uint) (*model.Customer, error) {
	return s.repo.Get(id)
}

func (s *CustomerService) Find(langId uint, p find.Paging, filt *filters.FiltersList, search string) (*find.Found[model.UserInList], error) {
	return s.repo.Find(langId, p, filt, search)
}
