Documentation ¶
Index ¶
- type RestaurantRepository
- func (repo *RestaurantRepository) GetAmountSupplyCosts(ctx context.Context, request api_service.CreateReportRequest) (amountSupplyCosts float64, err error)
- func (repo *RestaurantRepository) GetAverageOrderCheck(ctx context.Context, request api_service.CreateReportRequest) (avgOrderValue float64, err error)
- func (repo *RestaurantRepository) GetAverageSupplyCheck(ctx context.Context, request api_service.CreateReportRequest) (avgSupplyValue float64, err error)
- func (repo *RestaurantRepository) GetCustomerOrderHistory(ctx context.Context, request api_service.GetCustomerOrdersHistoryRequest) (response api_service.GetCustomerOrderHistoryResponse, err error)
- func (repo *RestaurantRepository) GetDishesByIngredient(ctx context.Context, ingredient string) (dishes []dish.RecieveDish, err error)
- func (repo *RestaurantRepository) GetDishesWithIngredients(ctx context.Context) (dishes []dish.Dish, err error)
- func (repo *RestaurantRepository) GetEmployeesOrdersCount(ctx context.Context, request api_service.GetEmployeesOrdersCountRequest) (responses []api_service.GetEmployeesOrdersCountResponse, err error)
- func (repo *RestaurantRepository) GetExpiringProducts(ctx context.Context) (responses []api_service.GetExpiringSoonProductsResponse, err error)
- func (repo *RestaurantRepository) GetLostRevenue(ctx context.Context, request api_service.CreateReportRequest) (lostRevenue float64, err error)
- func (repo *RestaurantRepository) GetMostPopularDishes(ctx context.Context) (responses []api_service.GetMostPopularDishesResponse, err error)
- func (repo *RestaurantRepository) GetNetProfit(ctx context.Context, request api_service.CreateReportRequest) (netProfit float64, err error)
- func (repo *RestaurantRepository) GetSuppliersByProduct(ctx context.Context, productName string) (suppliers []supplier.Supplier, err error)
- func (repo *RestaurantRepository) GetUnorderedDishes(ctx context.Context) (dishes []dish.RecieveDish, err error)
- func (repo *RestaurantRepository) Start()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RestaurantRepository ¶
func New ¶
func New(cfg config.Database) *RestaurantRepository
func (*RestaurantRepository) GetAmountSupplyCosts ¶
func (repo *RestaurantRepository) GetAmountSupplyCosts(ctx context.Context, request api_service.CreateReportRequest) (amountSupplyCosts float64, err error)
GetAmountSupplyCosts - получить сумму затрат на поставки за определенный срок
func (*RestaurantRepository) GetAverageOrderCheck ¶
func (repo *RestaurantRepository) GetAverageOrderCheck(ctx context.Context, request api_service.CreateReportRequest) (avgOrderValue float64, err error)
GetAverageOrderCheck - средний чек заказа
func (*RestaurantRepository) GetAverageSupplyCheck ¶
func (repo *RestaurantRepository) GetAverageSupplyCheck(ctx context.Context, request api_service.CreateReportRequest) (avgSupplyValue float64, err error)
GetAverageSupplyCheck - средний чек поставки
func (*RestaurantRepository) GetCustomerOrderHistory ¶
func (repo *RestaurantRepository) GetCustomerOrderHistory(ctx context.Context, request api_service.GetCustomerOrdersHistoryRequest) (response api_service.GetCustomerOrderHistoryResponse, err error)
func (*RestaurantRepository) GetDishesByIngredient ¶
func (repo *RestaurantRepository) GetDishesByIngredient(ctx context.Context, ingredient string) (dishes []dish.RecieveDish, err error)
func (*RestaurantRepository) GetDishesWithIngredients ¶
func (*RestaurantRepository) GetEmployeesOrdersCount ¶
func (repo *RestaurantRepository) GetEmployeesOrdersCount(ctx context.Context, request api_service.GetEmployeesOrdersCountRequest) (responses []api_service.GetEmployeesOrdersCountResponse, err error)
func (*RestaurantRepository) GetExpiringProducts ¶
func (repo *RestaurantRepository) GetExpiringProducts(ctx context.Context) (responses []api_service.GetExpiringSoonProductsResponse, err error)
func (*RestaurantRepository) GetLostRevenue ¶
func (repo *RestaurantRepository) GetLostRevenue(ctx context.Context, request api_service.CreateReportRequest) (lostRevenue float64, err error)
GetLostRevenue - поиск недополученной выручки из-за истечения срока годности продуктов
func (*RestaurantRepository) GetMostPopularDishes ¶
func (repo *RestaurantRepository) GetMostPopularDishes(ctx context.Context) (responses []api_service.GetMostPopularDishesResponse, err error)
func (*RestaurantRepository) GetNetProfit ¶
func (repo *RestaurantRepository) GetNetProfit(ctx context.Context, request api_service.CreateReportRequest) (netProfit float64, err error)
GetNetProfit - поиск чистой прибыли
func (*RestaurantRepository) GetSuppliersByProduct ¶
func (*RestaurantRepository) GetUnorderedDishes ¶
func (repo *RestaurantRepository) GetUnorderedDishes(ctx context.Context) (dishes []dish.RecieveDish, err error)
func (*RestaurantRepository) Start ¶
func (repo *RestaurantRepository) Start()
Click to show internal directories.
Click to hide internal directories.