27 lines
662 B
Go
27 lines
662 B
Go
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) (*find.Found[model.UserInList], error) {
|
|
return s.repo.Find(langId, p, filt)
|
|
}
|