Documentation ¶
Index ¶
- func NewAdminRepository(DB *gorm.DB) interfaces.AdminRepository
- func NewAuthRepository(db *gorm.DB) interfaces.AuthRepository
- func NewBrandDatabaseRepository(db *gorm.DB) interfaces.BrandRepository
- func NewCartRepository(db *gorm.DB) interfaces.CartRepository
- func NewCouponRepository(db *gorm.DB) interfaces.CouponRepository
- func NewOfferRepository(db *gorm.DB) interfaces.OfferRepository
- func NewOrderRepository(db *gorm.DB) interfaces.OrderRepository
- func NewPaymentRepository(db *gorm.DB) interfaces.PaymentRepository
- func NewProductRepository(db *gorm.DB) interfaces.ProductRepository
- func NewStockRepository(db *gorm.DB) interfaces.StockRepository
- func NewUserRepository(DB *gorm.DB) interfaces.UserRepository
- type OrderDatabase
- func (c *OrderDatabase) FindAllOrderReturns(ctx context.Context, pagination request.Pagination) (orderReturns []response.OrderReturn, err error)
- func (c *OrderDatabase) FindAllOrderStatuses(ctx context.Context) (orderStatuses []domain.OrderStatus, err error)
- func (c *OrderDatabase) FindAllOrdersItemsByShopOrderID(ctx context.Context, shopOrderID uint, pagination request.Pagination) (orderItems []response.OrderItem, err error)
- func (c *OrderDatabase) FindAllPendingOrderReturns(ctx context.Context, pagination request.Pagination) (pendingReturns []response.OrderReturn, err error)
- func (c *OrderDatabase) FindAllShopOrders(ctx context.Context, pagination request.Pagination) (shopOrders []response.ShopOrder, err error)
- func (c *OrderDatabase) FindAllShopOrdersByUserID(ctx context.Context, userID uint, pagination request.Pagination) (shopOrders []response.ShopOrder, err error)
- func (c *OrderDatabase) FindOrderReturnByReturnID(ctx context.Context, orderReturnID uint) (orderReturn domain.OrderReturn, err error)
- func (c *OrderDatabase) FindOrderReturnByShopOrderID(ctx context.Context, shopOrderID uint) (orderReturn domain.OrderReturn, err error)
- func (c *OrderDatabase) FindOrderStatusByID(ctx context.Context, orderStatusID uint) (domain.OrderStatus, error)
- func (c *OrderDatabase) FindOrderStatusByShopOrderID(ctx context.Context, shopOrderID uint) (orderStatus domain.OrderStatus, err error)
- func (c *OrderDatabase) FindOrderStatusByStatus(ctx context.Context, status domain.OrderStatusType) (domain.OrderStatus, error)
- func (c *OrderDatabase) FindShopOrderByShopOrderID(ctx context.Context, shopOrderID uint) (shopOrder domain.ShopOrder, err error)
- func (c *OrderDatabase) FindWalletByUserID(ctx context.Context, userID uint) (wallet domain.Wallet, err error)
- func (c *OrderDatabase) FindWalletTransactions(ctx context.Context, walletID uint, pagination request.Pagination) (transaction []domain.Transaction, err error)
- func (c *OrderDatabase) SaveOrderLine(ctx context.Context, orderLine domain.OrderLine) error
- func (c *OrderDatabase) SaveOrderReturn(ctx context.Context, orderReturn domain.OrderReturn) error
- func (c *OrderDatabase) SaveShopOrder(ctx context.Context, shopOrder domain.ShopOrder) (shopOrderID uint, err error)
- func (c *OrderDatabase) SaveWallet(ctx context.Context, userID uint) (walletID uint, err error)
- func (c *OrderDatabase) SaveWalletTransaction(ctx context.Context, walletTrx domain.Transaction) error
- func (c *OrderDatabase) Transaction(callBack func(trxRepo interfaces.OrderRepository) error) error
- func (c *OrderDatabase) UpdateOrderReturn(ctx context.Context, orderReturn domain.OrderReturn) error
- func (c *OrderDatabase) UpdateShopOrderOrderStatus(ctx context.Context, shopOrderID, changeStatusID uint) error
- func (c *OrderDatabase) UpdateShopOrderStatusAndSavePaymentMethod(ctx context.Context, shopOrderID, orderStatusID, paymentID uint) error
- func (c *OrderDatabase) UpdateWallet(ctx context.Context, walletID, upateTotalAmount uint) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewAdminRepository ¶
func NewAdminRepository(DB *gorm.DB) interfaces.AdminRepository
func NewAuthRepository ¶
func NewAuthRepository(db *gorm.DB) interfaces.AuthRepository
func NewBrandDatabaseRepository ¶
func NewBrandDatabaseRepository(db *gorm.DB) interfaces.BrandRepository
func NewCartRepository ¶
func NewCartRepository(db *gorm.DB) interfaces.CartRepository
func NewCouponRepository ¶
func NewCouponRepository(db *gorm.DB) interfaces.CouponRepository
func NewOfferRepository ¶
func NewOfferRepository(db *gorm.DB) interfaces.OfferRepository
func NewOrderRepository ¶
func NewOrderRepository(db *gorm.DB) interfaces.OrderRepository
func NewPaymentRepository ¶
func NewPaymentRepository(db *gorm.DB) interfaces.PaymentRepository
func NewProductRepository ¶
func NewProductRepository(db *gorm.DB) interfaces.ProductRepository
func NewStockRepository ¶
func NewStockRepository(db *gorm.DB) interfaces.StockRepository
func NewUserRepository ¶
func NewUserRepository(DB *gorm.DB) interfaces.UserRepository
Types ¶
type OrderDatabase ¶
func (*OrderDatabase) FindAllOrderReturns ¶
func (c *OrderDatabase) FindAllOrderReturns(ctx context.Context, pagination request.Pagination) (orderReturns []response.OrderReturn, err error)
func (*OrderDatabase) FindAllOrderStatuses ¶
func (c *OrderDatabase) FindAllOrderStatuses(ctx context.Context) (orderStatuses []domain.OrderStatus, err error)
func (*OrderDatabase) FindAllOrdersItemsByShopOrderID ¶
func (c *OrderDatabase) FindAllOrdersItemsByShopOrderID(ctx context.Context, shopOrderID uint, pagination request.Pagination) (orderItems []response.OrderItem, err error)
get order items of a specific order
func (*OrderDatabase) FindAllPendingOrderReturns ¶
func (c *OrderDatabase) FindAllPendingOrderReturns(ctx context.Context, pagination request.Pagination) (pendingReturns []response.OrderReturn, err error)
func (*OrderDatabase) FindAllShopOrders ¶
func (c *OrderDatabase) FindAllShopOrders(ctx context.Context, pagination request.Pagination) (shopOrders []response.ShopOrder, err error)
find all shop orders with user
func (*OrderDatabase) FindAllShopOrdersByUserID ¶
func (c *OrderDatabase) FindAllShopOrdersByUserID(ctx context.Context, userID uint, pagination request.Pagination) (shopOrders []response.ShopOrder, err error)
get all shop order of user
func (*OrderDatabase) FindOrderReturnByReturnID ¶
func (c *OrderDatabase) FindOrderReturnByReturnID(ctx context.Context, orderReturnID uint) (orderReturn domain.OrderReturn, err error)
func (*OrderDatabase) FindOrderReturnByShopOrderID ¶
func (c *OrderDatabase) FindOrderReturnByShopOrderID(ctx context.Context, shopOrderID uint) (orderReturn domain.OrderReturn, err error)
func (*OrderDatabase) FindOrderStatusByID ¶
func (c *OrderDatabase) FindOrderStatusByID(ctx context.Context, orderStatusID uint) (domain.OrderStatus, error)
find order status
func (*OrderDatabase) FindOrderStatusByShopOrderID ¶
func (c *OrderDatabase) FindOrderStatusByShopOrderID(ctx context.Context, shopOrderID uint) (orderStatus domain.OrderStatus, err error)
func (*OrderDatabase) FindOrderStatusByStatus ¶
func (c *OrderDatabase) FindOrderStatusByStatus(ctx context.Context, status domain.OrderStatusType) (domain.OrderStatus, error)
func (*OrderDatabase) FindShopOrderByShopOrderID ¶
func (c *OrderDatabase) FindShopOrderByShopOrderID(ctx context.Context, shopOrderID uint) (shopOrder domain.ShopOrder, err error)
find a specific shop order by shopOrderID
func (*OrderDatabase) FindWalletByUserID ¶
func (c *OrderDatabase) FindWalletByUserID(ctx context.Context, userID uint) (wallet domain.Wallet, err error)
find wallet by userID
func (*OrderDatabase) FindWalletTransactions ¶
func (c *OrderDatabase) FindWalletTransactions(ctx context.Context, walletID uint, pagination request.Pagination) (transaction []domain.Transaction, err error)
func (*OrderDatabase) SaveOrderLine ¶
func (*OrderDatabase) SaveOrderReturn ¶
func (c *OrderDatabase) SaveOrderReturn(ctx context.Context, orderReturn domain.OrderReturn) error
to save a return request
func (*OrderDatabase) SaveShopOrder ¶
func (*OrderDatabase) SaveWallet ¶
create a new wallet for user
func (*OrderDatabase) SaveWalletTransaction ¶
func (c *OrderDatabase) SaveWalletTransaction(ctx context.Context, walletTrx domain.Transaction) error
func (*OrderDatabase) Transaction ¶
func (c *OrderDatabase) Transaction(callBack func(trxRepo interfaces.OrderRepository) error) error
func (*OrderDatabase) UpdateOrderReturn ¶
func (c *OrderDatabase) UpdateOrderReturn(ctx context.Context, orderReturn domain.OrderReturn) error
update the order return
func (*OrderDatabase) UpdateShopOrderOrderStatus ¶
func (c *OrderDatabase) UpdateShopOrderOrderStatus(ctx context.Context, shopOrderID, changeStatusID uint) error
func (*OrderDatabase) UpdateShopOrderStatusAndSavePaymentMethod ¶
func (c *OrderDatabase) UpdateShopOrderStatusAndSavePaymentMethod(ctx context.Context, shopOrderID, orderStatusID, paymentID uint) error
func (*OrderDatabase) UpdateWallet ¶
func (c *OrderDatabase) UpdateWallet(ctx context.Context, walletID, upateTotalAmount uint) error
Source Files ¶
Click to show internal directories.
Click to hide internal directories.