forked from ebhomengo/niki
34 lines
887 B
Go
34 lines
887 B
Go
package service
|
|
|
|
import (
|
|
"git.gocasts.ir/ebhomengo/niki/domain/shoppingbasket/entity"
|
|
"git.gocasts.ir/ebhomengo/niki/types"
|
|
)
|
|
|
|
type AddToCartRequest struct {
|
|
UserID types.ID `json:"user_id"`
|
|
ProductID types.ID `json:"product_id"`
|
|
Quantity int `json:"quantity"`
|
|
Price types.Price `json:"price"`
|
|
Name string `json:"name"`
|
|
}
|
|
|
|
type GetCartResponse struct {
|
|
UserID types.ID `json:"user_id"`
|
|
Items []entity.Item `json:"items"`
|
|
TotalPrice types.Price `json:"total_price"`
|
|
CreatedAt int64 `json:"created_at"`
|
|
ExpireAt int64 `json:"expire_at"`
|
|
}
|
|
|
|
type RemoveFromCartRequest struct {
|
|
UserID types.ID `json:"user_id"`
|
|
ProductID types.ID `json:"product_id"`
|
|
}
|
|
|
|
type UpdateQuantityRequest struct {
|
|
UserID types.ID `json:"user_id"`
|
|
ProductID types.ID `json:"product_id"`
|
|
Quantity int `json:"quantity"`
|
|
}
|