Class OrderItem

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

@Entity public class OrderItem extends Object
Represents an item in an order.
  • Field Details

    • id

      private Long id
    • quantity

      private int quantity
    • product

      private Product product
    • order

      private Order order
  • Constructor Details

    • OrderItem

      public OrderItem(int quantity, Product product, Order order)
      Constructor without id for creating new order item instances.
      Parameters:
      quantity - The quantity of the item.
      product - The product associated with the item.
      order - The order associated with the item.