Project

Real Time

aa

1. Store Management:

Store Table:

  • Represents individual stores or restaurants.
  • Each Store is uniquely identified by an id.
  • Has a name to represent the name of the store.
  • Each store is associated with a userId, indicating which user manages or owns that store.

2. Product and Category Management:

Category Table:

  • Represents the various categories of products (like "Appetizers", "Main Course", etc.).
  • Each Category is associated with a particular Store through storeId.
  • Each category can also be associated with a Billboard (which seems to be an advertisement or featured display for that category) using billboardId.

Product Table:

  • Represents the individual items or dishes available for order in a store.
  • Each Product is associated with a particular Category through categoryId.
  • Products have various attributes like name, price, description, and flags to indicate if they are isFeatured or isArchived.

Image Table:

  • Represents images of individual products.
  • Each image is linked to a Product via the productId.
  • Contains a URL (url) pointing to the actual image file.

3. Table Management and Ordering:

Table Table (a bit of a tongue-twister):

  • Represents the physical tables inside a store.
  • Each table is associated with a particular Store through storeId.
  • Tables have an isPaid flag to indicate if the current orders on that table have been paid or not.

Order Table:

  • Represents orders placed by customers.
  • Each order is linked to a Store via the storeId.
  • Orders have different states, represented by the orderState enum. It can be "NOTREADY", "IN_PROGRESS", "READY", or "PAID".
  • The isPaid flag indicates if the order has been paid for or not.
  • Each order is associated with a table through tableId, indicating where the order is placed.

OrderItem Table:

  • Represents individual items within an order.
  • Each OrderItem is linked to a specific order using orderId and to a specific product using productId.
  • The count represents the quantity of that product in the order.

4. Billboard Management:

Billboard Table:

  • Represents billboards or advertisements for specific categories or promotional events.
  • Each billboard is associated with a specific Store through storeId.
  • Has attributes like label and imageUrl to display the content of the billboard.

Relationships:

  • A user can manage multiple stores, but each store is associated with only one user.
  • Each store can have multiple tables, categories, products, billboards, and orders.
  • A category belongs to one store and can be associated with one billboard.
  • A product belongs to one category and one store.
  • Each product can have multiple images.
  • An order is associated with one store and one table and can have multiple order items.
  • An order item is linked to one product and one order.
  • Each billboard is associated with one store.