Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Category ¶
type Category struct {
ID uint64 `db:"id"`
Name string `db:"name"`
CreatedAt time.Time `db:"created_at"`
UpdatedAt time.Time `db:"updated_at"`
}
func (Category) ToDomain ¶
func (c Category) ToDomain() *domaincategory.Category
type Order ¶
type Order struct {
ID uint64 `db:"id"`
UserID uint64 `db:"user_id"`
PaymentID uint64 `db:"payment_id"`
CustomerName string `db:"customer_name"`
TotalPrice float64 `db:"total_price"`
TotalPaid float64 `db:"total_paid"`
TotalReturn float64 `db:"total_return"`
ReceiptCode uuid.UUID `db:"receipt_code"`
CreatedAt time.Time `db:"created_at"`
UpdatedAt time.Time `db:"updated_at"`
User *User `db:"user"`
Payment *Payment `db:"payment"`
Products []OrderProduct `db:"products"`
}
type OrderProduct ¶
type Product ¶
type Product struct {
ID uint64 `db:"id"`
CategoryID uint64 `db:"category_id"`
SKU uuid.UUID `db:"sku"`
Name string `db:"name"`
Stock int64 `db:"stock"`
Price float64 `db:"price"`
Image string `db:"image"`
CreatedAt time.Time `db:"created_at"`
UpdatedAt time.Time `db:"updated_at"`
Category *Category `db:"category"`
}
Click to show internal directories.
Click to hide internal directories.