Customer Order

This commit is contained in:
aditya.siregar
2024-08-04 01:16:25 +07:00
parent 265dd9b6e8
commit bdf930445c
30 changed files with 832 additions and 43 deletions
+7
View File
@@ -10,6 +10,13 @@ type LoginResponse struct {
PartnerLicense *PartnerLicense `json:"partner_license,omitempty"`
}
type LoginResponseCustoemr struct {
ID int64 `json:"id"`
Token string `json:"token"`
Name string `json:"name"`
ResetPassword bool `json:"reset_password"`
}
type Role struct {
ID int64 `json:"id"`
Role string `json:"role_name"`
+32
View File
@@ -47,3 +47,35 @@ type SiteSeach struct {
ImageURL string `json:"imageUrl"`
Regency string `json:"regency"`
}
type SearchSiteByIDResponse struct {
ID int64 `json:"id"`
Name string `json:"name"`
PartnerID int64 `json:"partner_id"`
Image string `json:"image"`
Address string `json:"address"`
LocationLink string `json:"location_link"`
Description string `json:"description"`
Highlight string `json:"highlight"`
ContactPerson string `json:"contact_person"`
TnC string `json:"tn_c"`
AdditionalInfo string `json:"additional_info"`
Status string `json:"status"`
}
type SearchProductSiteByIDResponse struct {
ID int64 `json:"id"`
SiteID int64 `json:"site_id"`
Name string `json:"name"`
Type string `json:"type"`
Price float64 `json:"price"`
IsWeekendTicket bool `json:"is_weekend_ticket"`
IsSeasonTicket bool `json:"is_season_ticket"`
Description string `json:"description"`
PartnerID int64 `json:"partner_id"`
}
type SearchProductSiteResponse struct {
Product []SearchProductSiteByIDResponse `json:"product"`
PartnerID int64 `json:"partner_id"`
}
+21
View File
@@ -124,3 +124,24 @@ type PaymentDistribution struct {
PaymentType string `json:"payment_type"`
Count int `json:"count"`
}
type OrderDetail struct {
ID int64 `json:"id"` // Order ID
QRCode string `json:"qr_code"` // QR code data (can be a URL or base64 string)
FullName string `json:"full_name"` // Customer's full name
Email string `json:"email"` // Customer's email address
PhoneNumber string `json:"phone_number"` // Customer's phone number
OrderItems []OrderDetailItem `json:"order_items"` // List of ordered items
TotalAmount float64 `json:"total_amount"` // Total amount paid
CreatedAt time.Time `json:"created_at"` // Order creation time
Status string `json:"status"`
PaymentLink string `json:"payment_link"`
}
type OrderDetailItem struct {
ItemType string `json:"item_type"`
Description string `json:"description"`
Quantity int `json:"quantity"` // Quantity of the item
UnitPrice float64 `json:"unit_price"` // Price per unit
TotalPrice float64 `json:"total_price"` // Total price for this item (Quantity * UnitPrice)
}
+11
View File
@@ -1,5 +1,7 @@
package response
import "time"
type User struct {
ID int64 `json:"id"`
Name string `json:"name"`
@@ -19,3 +21,12 @@ type UserList struct {
Limit int `json:"limit"`
Offset int `json:"offset"`
}
type UserRegister struct {
ID int64 `json:"id"`
Name string `json:"name"`
Email string `json:"email"`
Status string `json:"status"`
CreatedAt time.Time `json:"created_at,omitempty"`
UpdatedAt time.Time `json:"updated_at,omitempty"`
}