// Copy this text, paste to https://dbdiagram.io/d
// Or, https://databasediagram.com/app
// Or, view in VSCode with extension: "DBML Live Preview"

Table Customer {
    id INTEGER [primary key]
    name VARCHAR(50) 
    email VARCHAR(50) 
    balance INTEGER 
    credit_limit INTEGER 
    }

Table Item {
    id INTEGER [primary key]
    order_id INTEGER 
    product_id INTEGER 
    quantity INTEGER 
    price INTEGER 
    unit_price INTEGER 
    amount INTEGER 
    }

Table Order {
    id INTEGER [primary key]
    customer_id INTEGER 
    order_date DATETIME 
    notes VARCHAR(255) 
    total_amount INTEGER 
    }

Table Product {
    id INTEGER [primary key]
    name VARCHAR(50) 
    price INTEGER 
    carbon_neutral BOOLEAN 
    }



// Relationships
    Ref: Item.(order_id) < Order.(id)
    Ref: Item.(product_id) < Product.(id)
    Ref: Order.(customer_id) < Customer.(id)
