adjust erm
This commit is contained in:
parent
dca95ae1f6
commit
e747974ed9
1 changed files with 10 additions and 10 deletions
20
erd.dbml
20
erd.dbml
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
Table Customer {
|
Table Customer {
|
||||||
id string [primary key]
|
id string [primary key]
|
||||||
address_id string
|
address string
|
||||||
first_name string
|
first_name string
|
||||||
last_name string
|
last_name string
|
||||||
birth_date timestamp
|
birth_date timestamp
|
||||||
|
@ -13,7 +13,7 @@ Table Customer {
|
||||||
|
|
||||||
Table Order {
|
Table Order {
|
||||||
id string [primary key]
|
id string [primary key]
|
||||||
customer_id string
|
customer string
|
||||||
invoice_amount float
|
invoice_amount float
|
||||||
order_date timestamp
|
order_date timestamp
|
||||||
}
|
}
|
||||||
|
@ -24,22 +24,22 @@ Table Ingredient {
|
||||||
stock integer
|
stock integer
|
||||||
net_price float
|
net_price float
|
||||||
unit string
|
unit string
|
||||||
carbonhydrates float
|
carbohydrates float
|
||||||
calories integer
|
calories integer
|
||||||
protein float
|
protein float
|
||||||
}
|
}
|
||||||
|
|
||||||
Table Supplier {
|
Table Supplier {
|
||||||
id string [primary key]
|
id string [primary key]
|
||||||
address_id string
|
address string
|
||||||
email string
|
email string
|
||||||
phone string
|
phone string
|
||||||
supplier_name string
|
name string
|
||||||
}
|
}
|
||||||
|
|
||||||
Table Recipe {
|
Table Recipe {
|
||||||
id string [primary key]
|
id string [primary key]
|
||||||
preperation_time integer
|
preparation_time integer
|
||||||
name string
|
name string
|
||||||
description string
|
description string
|
||||||
instructions string
|
instructions string
|
||||||
|
@ -50,7 +50,7 @@ Table Address {
|
||||||
city string
|
city string
|
||||||
street string
|
street string
|
||||||
house_number string
|
house_number string
|
||||||
postal_code integer
|
postal_code string
|
||||||
}
|
}
|
||||||
|
|
||||||
Table RecipeContainsIngredients {
|
Table RecipeContainsIngredients {
|
||||||
|
@ -72,9 +72,9 @@ Table OrderContainsIngredients {
|
||||||
quantity integer
|
quantity integer
|
||||||
}
|
}
|
||||||
|
|
||||||
Ref: Order.customer_id > Customer.id
|
Ref: Order.customer > Customer.id
|
||||||
Ref: Address.id - Customer.address_id
|
Ref: Address.id - Customer.address
|
||||||
Ref: Address.id - Supplier.address_id
|
Ref: Address.id - Supplier.address
|
||||||
Ref: SupplierContainsIngredients.supplier > Supplier.id
|
Ref: SupplierContainsIngredients.supplier > Supplier.id
|
||||||
Ref: SupplierContainsIngredients.ingredient > Ingredient.id
|
Ref: SupplierContainsIngredients.ingredient > Ingredient.id
|
||||||
Ref: OrderContainsIngredients.order > Order.id
|
Ref: OrderContainsIngredients.order > Order.id
|
||||||
|
|
Loading…
Add table
Reference in a new issue