From af69c4fe07ec1d271685765bfb3588082b7196fa Mon Sep 17 00:00:00 2001 From: Nikolai Papin Date: Tue, 12 Aug 2025 23:53:19 +0300 Subject: [PATCH] feat: initialized wishlist service --- backend/internal/services/wishlist.go | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/backend/internal/services/wishlist.go b/backend/internal/services/wishlist.go index b65975c..69264cb 100644 --- a/backend/internal/services/wishlist.go +++ b/backend/internal/services/wishlist.go @@ -17,11 +17,20 @@ package services -import "easywish/internal/dto" +import ( + "easywish/internal/dto" + "easywish/internal/utils/enums" +) type WishListService interface { CreateWishList(cinfo dto.ClientInfo, object dto.NewWishListDto) (*dto.WishListDto, error) - CreateWish(cinfo dto.ClientInfo, object dto.NewWishDto) (*dto.WishDto, error) + UpdateWishListByGuid(cinfo dto.ClientInfo, guid string, object dto.NewWishDto) (bool, error) + DeleteWishListByGuid(cinfo dto.ClientInfo, guid string) (bool, error) GetWishListByGuid(cinfo dto.ClientInfo, guid string) (*dto.WishListDto, error) - GetUserWishListsPaginated(cinfo dto.ClientInfo, amount int, page int) (*[]dto.WishListDto, error) + GetUserWishListsPaginated(cinfo dto.ClientInfo, amount int, page int, sorting enums.Sorting, sortOrder enums.SortOrder) (*[]dto.WishListDto, error) + + CreateWish(cinfo dto.ClientInfo, object dto.NewWishDto) (*dto.WishDto, error) + UpdateWish(cinfo dto.ClientInfo, guid string, object dto.NewWishDto) (bool, error) + GetWishByGuid(cinfo dto.ClientInfo, guid string) (*dto.WishDto, error) + GetWishesByWishListGuidPaginated(cinfo dto.ClientInfo, guid string, amount int, page int, sorting enums.Sorting, sortOrder enums.SortOrder) (*[]dto.WishDto, error) }