Class ShoppingCart

java.lang.Object
com.esprit.models.products.ShoppingCart

@Entity public class ShoppingCart extends Object
Is used to represent a shopping cart containing various products and users.
  • Field Details

    • id

      private Long id
    • quantity

      private int quantity
    • product

      private Product product
    • user

      private User user
  • Constructor Details

    • ShoppingCart

      public ShoppingCart(int quantity, Product product, User user)
      Constructor without id for creating new shopping cart instances.
      Parameters:
      quantity - The quantity of the product in the cart.
      product - The product associated with the cart.
      user - The user associated with the cart.