managers

package
v0.0.0-...-7fab21c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 3, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ProductManager

type ProductManager struct{}

---------------------------------- PRODUCT MANAGEMENT --------------------------------

func (ProductManager) Create

func (obj ProductManager) Create(db *gorm.DB, data schemas.CreateProduct, userId uuid.UUID) *models.Product

func (ProductManager) DropData

func (obj ProductManager) DropData(db *gorm.DB) error

func (ProductManager) GetAll

func (obj ProductManager) GetAll(db *gorm.DB) ([]*models.Product, *int, *utils.ErrorResponse)

func (ProductManager) GetById

func (obj ProductManager) GetById(db *gorm.DB, id uuid.UUID) (*models.Product, *int, *utils.ErrorResponse)

func (ProductManager) GetBySlug

func (obj ProductManager) GetBySlug(db *gorm.DB, slug string) (*models.Product, *int, *utils.ErrorResponse)

func (ProductManager) UpdateDiscount

func (obj ProductManager) UpdateDiscount(db *gorm.DB, id uuid.UUID, data schemas.UpdateDiscount) (*models.Product, *int, *utils.ErrorResponse)

func (ProductManager) UpdateRating

func (obj ProductManager) UpdateRating(db *gorm.DB, productId *uuid.UUID) (*models.Product, *int, *utils.ErrorResponse)

func (ProductManager) UpdateStock

func (pm ProductManager) UpdateStock(db *gorm.DB, id uuid.UUID, stockChange int) (*models.Product, *int, *utils.ErrorResponse)

type ReviewManager

type ReviewManager struct{}

---------------------------------- PRODUCT MANAGEMENT --------------------------------

func (ReviewManager) Create

func (obj ReviewManager) Create(db *gorm.DB, data schemas.CreateReview, userId, productId *uuid.UUID) (*models.Review, *int, *utils.ErrorResponse)

type UserManager

type UserManager struct{}

---------------------------------- USER MANAGEMENT --------------------------------

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL