dto

package
v0.0.0-...-10ef84c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 17, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CancelOrderReqDto

type CancelOrderReqDto struct {
	CancelReason string `json:"cancelReason" validate:"required"`
}

type ChangeDeliveryAddressReqDto

type ChangeDeliveryAddressReqDto struct {
	DeliveryAddress string `json:"deliveryAddress" bson:"deliveryAddress,omitempty" validate:"required"`
}

type CreateOrderReqDto

type CreateOrderReqDto struct {
	ShopItems       []*models.ShopItem `json:"shopItems" bson:"shopItems,omitempty" validate:"required"`
	AccountEmail    string             `json:"accountEmail" bson:"accountEmail,omitempty" validate:"required,email"`
	DeliveryAddress string             `json:"deliveryAddress" bson:"deliveryAddress,omitempty" validate:"required"`
}

type OrderResponseDto

type OrderResponseDto struct {
	ID              string     `json:"id" bson:"_id,omitempty"`
	OrderID         string     `json:"orderId,omitempty" bson:"orderId,omitempty"`
	ShopItems       []ShopItem `json:"shopItems,omitempty" bson:"shopItems,omitempty"`
	AccountEmail    string     `json:"accountEmail,omitempty" bson:"accountEmail,omitempty" validate:"required,email"`
	DeliveryAddress string     `json:"deliveryAddress,omitempty" bson:"deliveryAddress,omitempty"`
	CancelReason    string     `json:"cancelReason,omitempty" bson:"cancelReason,omitempty"`
	TotalPrice      float64    `json:"totalPrice,omitempty" bson:"totalPrice,omitempty"`
	DeliveredTime   time.Time  `json:"deliveredTime,omitempty" bson:"deliveredTime,omitempty"`
	Created         bool       `json:"created,omitempty" bson:"created,omitempty"`
	Paid            bool       `json:"paid,omitempty" bson:"paid,omitempty"`
	Submitted       bool       `json:"submitted,omitempty" bson:"submitted,omitempty"`
	Completed       bool       `json:"completed,omitempty" bson:"completed,omitempty"`
	Canceled        bool       `json:"canceled,omitempty" bson:"canceled,omitempty"`
	Payment         Payment    `json:"payment,omitempty" bson:"payment,omitempty"`
}

type OrderSearchResponseDto

type OrderSearchResponseDto struct {
	Pagination Pagination         `json:"pagination"`
	Orders     []OrderResponseDto `json:"orders"`
}

type Pagination

type Pagination struct {
	TotalCount int64 `json:"totalCount"`
	TotalPages int64 `json:"totalPages"`
	Page       int64 `json:"page"`
	Size       int64 `json:"size"`
	HasMore    bool  `json:"hasMore"`
}

type Payment

type Payment struct {
	PaymentID string    `json:"paymentID" bson:"paymentID,omitempty" validate:"required"`
	Timestamp time.Time `json:"timestamp" bson:"timestamp,omitempty" validate:"required"`
}

type ShopItem

type ShopItem struct {
	ID          string  `json:"id" bson:"id,omitempty"`
	Title       string  `json:"title" bson:"title,omitempty"`
	Description string  `json:"description" bson:"description,omitempty"`
	Quantity    uint64  `json:"quantity" bson:"quantity,omitempty"`
	Price       float64 `json:"price" bson:"price,omitempty"`
}

type UpdateShoppingItemsReqDto

type UpdateShoppingItemsReqDto struct {
	ShopItems []*models.ShopItem `json:"shopItems" bson:"shopItems,omitempty" validate:"required"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL