35 lines
955 B
Go
35 lines
955 B
Go
package orderService
|
|
|
|
import (
|
|
"git.ma-al.com/goc_daniel/b2b/app/model"
|
|
"git.ma-al.com/goc_daniel/b2b/app/repos/ordersRepo"
|
|
"git.ma-al.com/goc_daniel/b2b/app/utils/query/filters"
|
|
"git.ma-al.com/goc_daniel/b2b/app/utils/query/find"
|
|
)
|
|
|
|
type OrderService struct {
|
|
ordersRepo ordersRepo.UIOrdersRepo
|
|
}
|
|
|
|
func New() *OrderService {
|
|
return &OrderService{
|
|
ordersRepo: ordersRepo.New(),
|
|
}
|
|
}
|
|
|
|
func (s *OrderService) Find(user *model.Customer, p find.Paging, filt *filters.FiltersList) (find.Found[model.CustomerOrder], error) {
|
|
return s.ordersRepo.Find(user.ID, p, filt)
|
|
}
|
|
|
|
func (s *OrderService) PlaceNewOrder(user_id uint, cart_id uint, country_id uint, address_info string) error {
|
|
return nil
|
|
}
|
|
|
|
func (s *OrderService) ChangeOrderAddress(user *model.Customer, order_id uint, country_id uint, address_info string) error {
|
|
return nil
|
|
}
|
|
|
|
func (s *OrderService) ChangeOrderStatus(user *model.Customer, order_id uint, status string) error {
|
|
return nil
|
|
}
|