@startuml
'https://plantuml.com/class-diagram

entity users {
    * id <<PK>>
    * username
    * password
    * updated_at
    * created_at
}

entity business_permit {
    * id <<PK>>
    * permit_number
    * user_id <<FK>>
}

entity products {
    * id <<PK>>
    * user_id <<FK>>
    * name
    * description
    * price
    image
    * updated_at
    * created_at
}

entity line_items {
    * id <<PK>>
    * product_id <<FK>>
    * cart_id <<FK>>
    * order_id <<FK>>
    * quantity
    * price
    * updated_at
    * created_at
}

entity carts {
    * id <<PK>>
    * updated_at
    * created_at
}

entity orders {
    * id <<PK>>
    * buyer_name
    * buyer_email
    * address
    * payment_info
    * updated_at
    * created_at
}

entity genres {
    * id <<PK>>
    * name
    * description
    * product_id <<FK>>
}

users }o--|| products
users |o--|| business_permit
products }o--|| line_items
line_items |o--o{ carts
line_items |o--o{ orders
orders }o--o{ users
orders }o--o{ products
products }o--|| genres




@enduml