Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cart ¶
type Cart struct { UserID uuid.UUID `json:"user_id"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` Cartlines []*CartLine }
Represents how the cart structure is stored in the database
func (*Cart) ToProto ¶
func (cart *Cart) ToProto() *pbCart.CartResponse
type CartLine ¶
type CartLine struct { UserID uuid.UUID `json:"user_id"` ProductID uuid.UUID `json:"product_id"` Quantity int64 `json:"quantity" validate:"min=0,max=10000000"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
Represents one line with a product in a shopping cart in the database
func (*CartLine) ToProto ¶
func (cartline *CartLine) ToProto() *pbCart.CartlineResponse
Click to show internal directories.
Click to hide internal directories.