package entities import ( "time" "github.com/google/uuid" ) // PaymentMethodAnalytics represents payment method analytics data type PaymentMethodAnalytics struct { PaymentMethodID uuid.UUID `json:"payment_method_id"` PaymentMethodName string `json:"payment_method_name"` PaymentMethodType string `json:"payment_method_type"` TotalAmount float64 `json:"total_amount"` OrderCount int64 `json:"order_count"` PaymentCount int64 `json:"payment_count"` } // SalesAnalytics represents sales analytics data type SalesAnalytics struct { Date time.Time `json:"date"` Sales float64 `json:"sales"` Orders int64 `json:"orders"` Items int64 `json:"items"` Tax float64 `json:"tax"` Discount float64 `json:"discount"` NetSales float64 `json:"net_sales"` } // PurchasingAnalytics represents purchasing analytics data type PurchasingAnalytics struct { OutletName *string `json:"outlet_name,omitempty"` Summary PurchasingSummary `json:"summary"` Data []PurchasingAnalyticsData `json:"data"` IngredientData []PurchasingIngredientData `json:"ingredient_data"` VendorData []PurchasingVendorData `json:"vendor_data"` } type PurchasingSummary struct { TotalPurchases float64 `json:"total_purchases"` TotalPurchaseOrders int64 `json:"total_purchase_orders"` TotalQuantity float64 `json:"total_quantity"` AveragePurchaseOrderValue float64 `json:"average_purchase_order_value"` TotalIngredients int64 `json:"total_ingredients"` TotalVendors int64 `json:"total_vendors"` } type PurchasingAnalyticsData struct { Date time.Time `json:"date"` Purchases float64 `json:"purchases"` PurchaseOrders int64 `json:"purchase_orders"` Quantity float64 `json:"quantity"` Ingredients int64 `json:"ingredients"` Vendors int64 `json:"vendors"` } type PurchasingIngredientData struct { IngredientID uuid.UUID `json:"ingredient_id"` IngredientName string `json:"ingredient_name"` Quantity float64 `json:"quantity"` TotalCost float64 `json:"total_cost"` AverageUnitCost float64 `json:"average_unit_cost"` PurchaseOrderCount int64 `json:"purchase_order_count"` } type PurchasingVendorData struct { VendorID uuid.UUID `json:"vendor_id"` VendorName string `json:"vendor_name"` TotalCost float64 `json:"total_cost"` PurchaseOrderCount int64 `json:"purchase_order_count"` IngredientCount int64 `json:"ingredient_count"` Quantity float64 `json:"quantity"` } type ProductAnalytics struct { ProductID uuid.UUID `json:"product_id"` ProductName string `json:"product_name"` ProductSku string `json:"product_sku"` CategoryID uuid.UUID `json:"category_id"` CategoryName string `json:"category_name"` CategoryOrder int `json:"category_order"` QuantitySold int64 `json:"quantity_sold"` Revenue float64 `json:"revenue"` AveragePrice float64 `json:"average_price"` OrderCount int64 `json:"order_count"` StandardHppPerUnit float64 `json:"standard_hpp_per_unit"` StandardHppTotal float64 `json:"standard_hpp_total"` FifoHppPerUnit float64 `json:"fifo_hpp_per_unit"` FifoHppTotal float64 `json:"fifo_hpp_total"` MovingAverageHppPerUnit float64 `json:"moving_average_hpp_per_unit"` MovingAverageHppTotal float64 `json:"moving_average_hpp_total"` } type ProductAnalyticsPerCategory struct { CategoryID uuid.UUID `json:"category_id"` CategoryName string `json:"category_name"` TotalRevenue float64 `json:"total_revenue"` TotalQuantity int64 `json:"total_quantity"` ProductCount int64 `json:"product_count"` OrderCount int64 `json:"order_count"` TotalStandardHpp float64 `json:"total_standard_hpp"` TotalFifoHpp float64 `json:"total_fifo_hpp"` TotalMovingAverageHpp float64 `json:"total_moving_average_hpp"` } // DashboardOverview represents dashboard overview data type DashboardOverview struct { TotalSales float64 `json:"total_sales"` TotalOrders int64 `json:"total_orders"` AverageOrderValue float64 `json:"average_order_value"` TotalCustomers int64 `json:"total_customers"` VoidedOrders int64 `json:"voided_orders"` RefundedOrders int64 `json:"refunded_orders"` } type ProfitLossAnalytics struct { TodayRevenue float64 TodayCost float64 MtdRevenue float64 MtdCost float64 TodayExpenseByCategory []ExpenseCategoryTotal MtdExpenseByCategory []ExpenseCategoryTotal OperationalExpenseItems []OperationalExpenseItem } type ExpenseCategoryTotal struct { CategoryName string Amount float64 } type OperationalExpenseItem struct { Item string Amount float64 }