package order

//road_uid,
//SUM(order_amount) AS total_order_amount,
//COUNT(id) AS total_order_count,
//SUM(CASE WHEN STATUS = 'success' THEN order_amount ELSE 0 END) AS success_fact_amount,
//SUM(CASE WHEN STATUS = 'success' THEN 1 ELSE 0 END) AS success_fact_count,
//SUM(CASE WHEN STATUS = 'success' THEN 1 ELSE 0 END) / COUNT(id) AS success_fact_avg

type OrderSummaryOutput struct {
	RoadUid           string  `json:"road_uid" orm:"road_uid"`
	TotalOrderAmount  float64 `json:"total_order_amount" orm:"total_order_amount"`
	TotalOrderCount   int64   `json:"total_order_count" orm:"total_order_count"`
	SuccessFactAmount float64 `json:"success_fact_amount" orm:"success_fact_amount"`
	SuccessFactCount  int64   `json:"success_fact_count" orm:"success_fact_count"`
	SuccessFactAvg    float64 `json:"success_fact_avg" orm:"success_fact_avg"`
}
