package
Version:
v0.0.0-...-9bcb3a8
Opens a new window with list of versions in this module.
Published: Sep 20, 2024
License: MIT
Opens a new window with license information.
Imports: 1
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
type CartWithCountRes struct {
Cart []*entity.Cart `json:"cart"`
TotalCart int `json:"total_cart"`
}
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[T any] struct {
Data T `json:"data"`
Paging *Paging `json:"paging"`
}
type DeleteItemCartReq struct {
UserId string `json:"user_id" validate:"required,min=21,max=21"`
ProductId uint32 `json:"product_id" validate:"required"`
}
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 struct {
TotalData int `json:"total_data"`
Page int `json:"page"`
TotalPage int `json:"total_page"`
}
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"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.