init project
This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
package response
|
||||
|
||||
import (
|
||||
"furtuna-be/internal/constants/order"
|
||||
"furtuna-be/internal/constants/transaction"
|
||||
)
|
||||
|
||||
type Order struct {
|
||||
ID int64 `json:"id" `
|
||||
BranchID int64 `json:"branch_id" `
|
||||
BranchName string `json:"branch_name" `
|
||||
Amount float64 `json:"amount" `
|
||||
Status order.OrderStatus `json:"status" `
|
||||
CustomerName string `json:"customer_name" `
|
||||
CustomerPhone string `json:"customer_phone" `
|
||||
Pax int `json:"pax" `
|
||||
PaymentMethod transaction.PaymentMethod `json:"payment_method" `
|
||||
OrderItem []OrderItem `json:"order_items" `
|
||||
CreatedAt string `json:"created_at"`
|
||||
UpdatedAt string `json:"updated_at"`
|
||||
}
|
||||
|
||||
type OrderItem struct {
|
||||
OrderItemID int64 `json:"order_item_id" `
|
||||
ItemID int64 `json:"item_id" `
|
||||
ItemType order.ItemType `json:"item_type" `
|
||||
ItemName string `json:"item_name" `
|
||||
Price float64 `json:"price" `
|
||||
Qty int64 `json:"qty" `
|
||||
CreatedAt string `json:"created_at"`
|
||||
UpdatedAt string `json:"updated_at"`
|
||||
}
|
||||
|
||||
type OrderList struct {
|
||||
Orders []Order `json:"orders"`
|
||||
Total int64 `json:"total"`
|
||||
Limit int `json:"limit"`
|
||||
Offset int `json:"offset"`
|
||||
}
|
||||
|
||||
type OrderMonthlyRevenue struct {
|
||||
TotalRevenue float64 `json:"total_revenue"`
|
||||
TotalTransaction int64 `json:"total_transaction"`
|
||||
}
|
||||
|
||||
type OrderBranchRevenue struct {
|
||||
BranchID string `json:"branch_id"`
|
||||
BranchName string `json:"name"`
|
||||
BranchLocation string `json:"location"`
|
||||
TotalTransaction int `json:"total_trans"`
|
||||
TotalAmount float64 `json:"total_amount"`
|
||||
}
|
||||
Reference in New Issue
Block a user