dto

package
v0.0.0-...-9bcb3a8 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CartWithCountRes

type CartWithCountRes struct {
	Cart      []*entity.Cart `json:"cart"`
	TotalCart int            `json:"total_cart"`
}

type CreateCartReq

type CreateCartReq struct {
	UserId    string `json:"user_id" validate:"required,min=21,max=21"`
	ProductId uint32 `json:"product_id" validate:"required"`
	Quantity  uint32 `json:"quantity" validate:"required"`
}

type DataWithPaging

type DataWithPaging[T any] struct {
	Data   T       `json:"data"`
	Paging *Paging `json:"paging"`
}

type DeleteItemCartReq

type DeleteItemCartReq struct {
	UserId    string `json:"user_id" validate:"required,min=21,max=21"`
	ProductId uint32 `json:"product_id" validate:"required"`
}

type GetCartByCurrentUserReq

type GetCartByCurrentUserReq struct {
	UserId string `json:"user_id" validate:"required,min=21,max=21"`
	Page   int    `json:"page" validate:"required,min=1,max=2"`
}

type Paging

type Paging struct {
	TotalData int `json:"total_data"`
	Page      int `json:"page"`
	TotalPage int `json:"total_page"`
}

type ProductCartRes

type ProductCartRes struct {
	UserId      string  `json:"user_id"`
	ProductId   uint32  `json:"product_id"`
	Quantity    uint32  `json:"quantity"`
	ProductName string  `json:"product_name"`
	Image       string  `json:"image"`
	Price       uint32  `json:"price"`
	Stock       uint32  `json:"stock"`
	Length      uint32  `json:"length"`
	Width       uint32  `json:"width"`
	Height      uint32  `json:"height"`
	Weight      float32 `json:"weight"`
}

Jump to

Keyboard shortcuts

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