Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Order ¶
type Order struct { ID primitive.ObjectID `json:"id" bson:"_id"` UserID string `json:"user_id" bson:"user_id"` OrderItems []OrderItem `json:"order_items" bson:"order_items"` TotalPrice float64 `json:"total_price" bson:"total_price"` OrderDate string `json:"order_date" bson:"order_date"` ShippingAddress types.Address `json:"shipping_address" bson:"shipping_address"` PaymentMethod PaymentMethod `json:"payment_method" bson:"payment_method"` OrderStatus OrderStatus `json:"order_status" bson:"order_status"` CreatedAt time.Time `json:"created_at" bson:"created_at"` UpdatedAt time.Time `json:"updated_at" bson:"updated_at"` }
type OrderStatus ¶
type OrderStatus string
const ( OrderStatusPending OrderStatus = "pending" OrderStatusProcessing OrderStatus = "processing" OrderStatusShipped OrderStatus = "shipped" OrderStatusDelivered OrderStatus = "delivered" OrderStatusCancelled OrderStatus = "cancelled" )
type PaymentMethod ¶
type PaymentMethod struct { ID string `json:"id" bson:"id"` CardNumber string `json:"card_number" bson:"card_number"` CardHolder string `json:"card_holder" bson:"card_holder"` ExpirationDate string `json:"expiration_date" bson:"expiration_date"` CVV string `json:"cvv" bson:"cvv"` BillingAddress types.Address `json:"billing_address" bson:"billing_address"` }
type PaymentStatus ¶
type PaymentStatus string
const ( PaymentStatusPending PaymentStatus = "pending" PaymentStatusPaid PaymentStatus = "paid" PaymentStatusFailed PaymentStatus = "failed" PaymentStatusRefunded PaymentStatus = "refunded" )
Click to show internal directories.
Click to hide internal directories.