77 lines
2.2 KiB
Go
77 lines
2.2 KiB
Go
package models
|
|
|
|
import "time"
|
|
|
|
type WeekdayRow struct {
|
|
DOW int `gorm:"column:dow"`
|
|
Count int `gorm:"column:count"`
|
|
}
|
|
|
|
type DayRow struct {
|
|
Day time.Time `gorm:"column:day"`
|
|
Count int `gorm:"column:count"`
|
|
}
|
|
|
|
type ProductRow struct {
|
|
ProductID int `gorm:"column:product_id"`
|
|
Name string `gorm:"column:name"`
|
|
Quantity float64 `gorm:"column:total_quantity"`
|
|
OrderCount int `gorm:"column:order_count"`
|
|
Revenue float64 `gorm:"column:revenue"`
|
|
Category string `gorm:"column:category"`
|
|
CategoryColor string `gorm:"column:category_color"`
|
|
}
|
|
|
|
type HourRow struct {
|
|
Hour int `gorm:"column:hour"`
|
|
Count int `gorm:"column:count"`
|
|
Revenue float64 `gorm:"column:revenue"`
|
|
}
|
|
|
|
type QuantityBreakdownRow struct {
|
|
ProductID int `gorm:"column:product_id"`
|
|
ProductName string `gorm:"column:product_name"`
|
|
Quantity float64 `gorm:"column:quantity"`
|
|
OrderCount int `gorm:"column:order_count"`
|
|
TotalSold float64 `gorm:"column:total_sold"`
|
|
Revenue float64 `gorm:"column:revenue"`
|
|
CategoryColor string `gorm:"column:category_color"`
|
|
}
|
|
|
|
type DayRevenueRow struct {
|
|
Day time.Time `gorm:"column:day"`
|
|
Revenue float64 `gorm:"column:revenue"`
|
|
}
|
|
|
|
type DailyProductRow struct {
|
|
ProductID int `gorm:"column:product_id"`
|
|
ProductName string `gorm:"column:product_name"`
|
|
Category string `gorm:"column:category"`
|
|
CategoryColor string `gorm:"column:category_color"`
|
|
TotalQuantity float64 `gorm:"column:total_quantity"`
|
|
OrderCount int `gorm:"column:order_count"`
|
|
Revenue float64 `gorm:"column:revenue"`
|
|
}
|
|
|
|
type DayRowWithResult struct {
|
|
Day time.Time `gorm:"column:day"`
|
|
Count int `gorm:"column:count"`
|
|
Revenue float64 `gorm:"column:revenue"`
|
|
}
|
|
type WeekRow struct {
|
|
WeekNum int `gorm:"column:week_num"`
|
|
Year int `gorm:"column:year"`
|
|
Count int `gorm:"column:count"`
|
|
Revenue float64 `gorm:"column:revenue"`
|
|
}
|
|
type MonthRow struct {
|
|
MonthNum int `gorm:"column:month_num"`
|
|
Year int `gorm:"column:year"`
|
|
Count int `gorm:"column:count"`
|
|
Revenue float64 `gorm:"column:revenue"`
|
|
}
|
|
type TodayRow struct {
|
|
Count int `gorm:"column:count"`
|
|
Revenue float64 `gorm:"column:revenue"`
|
|
}
|