Inventory Schema (DBML)
Warehouses, products, and stock levels.
Make it your own.
Table warehouses {
id uuid [pk]
name varchar
location varchar
}
Table products {
id uuid [pk]
sku varchar [unique]
name varchar
unit_price decimal
}
Table stock {
id uuid [pk]
warehouse_id uuid [ref: > warehouses.id]
product_id uuid [ref: > products.id]
quantity int
reorder_level int
}
Table movements {
id uuid [pk]
stock_id uuid [ref: > stock.id]
delta int [note: 'positive = restock, negative = sale']
created_at timestamp
}