Documentation ¶
Index ¶
- func BadGatewayResponse(ctx *gin.Context, errors []string)
- func BadRequestResponse(ctx *gin.Context, errors []string)
- func CreatedResponse(ctx *gin.Context, data interface{})
- func OkResponse(ctx *gin.Context, data interface{})
- type Customer
- type CustomerAddress
- type Order
- type OrderDetail
- type OrderPayload
- type PaymentMethod
- type Product
- type Response
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BadGatewayResponse ¶
func BadRequestResponse ¶
func CreatedResponse ¶
func OkResponse ¶
Types ¶
type CustomerAddress ¶
type Order ¶
type Order struct { ID int `json:"id" gorm:"primaryKey"` CustomerID int `json:"customer_id" gorm:"not null"` Customer *Customer `json:"customer,omitempty"` AddressID int `json:"address_id" gorm:"not null"` Address *CustomerAddress `json:"address,omitempty"` }
type OrderDetail ¶
type OrderDetail struct { ID int `json:"id" gorm:"primaryKey"` OrderID int `json:"order_id" gorm:"not null"` Order *Order `json:"order,omitempty"` ProductID int `json:"product_id" gorm:"not null"` Product *Product `json:"product,omitempty"` Quantity int `json:"quantity" gorm:"not null"` TotalPrice float32 `json:"total_price" gorm:"not null"` PaymentMethodID int `json:"payment_method_id" gorm:"not null"` PaymentMethod *PaymentMethod `json:"payment_method,omitempty"` IsPaid bool `json:"is_paid" gorm:"not null;default:false"` }
type OrderPayload ¶
type PaymentMethod ¶
Click to show internal directories.
Click to hide internal directories.