Untitled
unknown
javascript
2 years ago
2.0 kB
5
Indexable
```mermaid erDiagram Customer -->|has| Order Customer -->|has many| OrderItem Order -->|has many| OrderItem OrderItem -->|belongs to| Product Product -->|has many| OrderItem Product -->|belongs to| Category Category -->|has many| Product Customer -->|has| User PromoCode -->|has many| User PromoCode -->|has many| Product ProductGroup -->|has many| Product UserRole -->|has many| User Customer -->|has many| Motorcycle Customer -->|has many| GiftCard GiftCard -->|has many| Order Customer -->|has many| ShoppingCart ShoppingCart -->|has many| Product Order -->|has many| OrderPaymentHistory OrderPaymentHistory -->|belongs to| Order Customer -->|has many| CustomerDocuments CustomerDocuments -->|belongs to| Customer Order -->|belongs to| Invoice Invoice -->|belongs to| Order class Customer { +id +name +email +password +address } class User { +id +username +password +role +customer_id } class Product { +id +name +price +description +image +category_id } class Category { +id +name +description } class ProductGroup { +id +name +description } class Order { +id +customer_id +order_date +total } class OrderItem { +id +order_id +product_id +quantity } class Invoice { +id +order_id +invoice_date +total } class PromoCode { +id +code +discount +start_date +end_date +is_single_use } class UserRole { +id +name } class GiftCard { +id +balance +start_date +end_date } class Motorcycle { +id +make +model +customer_id } class ShoppingCart { +id +customer_id +total } class OrderPaymentHistory { +id +order_id +payment_date +amount } class CustomerDocuments { +id +customer_id +file } ```
Editor is loading...