digraph dbml { rankdir=LR; graph [fontname="helvetica", fontsize=32, fontcolor="#29235c", bgcolor="transparent"]; node [penwidth=0, margin=0, fontname="helvetica", fontsize=32, fontcolor="#29235c"]; edge [fontname="helvetica", fontsize=32, fontcolor="#29235c", color="#29235c"]; "products_status" [id="products_status";label=<
products_status
out_of_stock
in_stock
running_low
>]; subgraph cluster_merchants { label="merchants" style=filled; color="#dddddd"; "merchants" [id="merchants";label=<
merchants
id int
country_code int
merchant_name varchar
created at varchar
admin_id int
id, country_code
>]; "merchant_periods" [id="merchant_periods";label=<
merchant_periods
id int
merchant_id int
country_code int
start_date datetime
end_date datetime
merchant_id, country_code
>]; } "users" [id="users";label=<
users
id int
full_name varchar
created_at timestamp
country_code int
>]; "countries" [id="countries";label=<
countries
code int
name varchar
continent_name varchar
>]; "order_items" [id="order_items";label=<
order_items
order_id int
product_id int
quantity int
>]; "orders" [id="orders";label=<
orders
id int
user_id int (!)
status varchar
created_at varchar
>]; "products" [id="products";label=<
products
id int
name varchar
merchant_id int (!)
price int
status products_status
created_at datetime
>]; "users":f0 -> "countries":f0 [style=invis, weight=100, color=red] "users":f4:e -> "countries":f1:w [dir=forward, penwidth=3, color="#29235c", headlabel="1", taillabel="*"] "merchants":f0 -> "countries":f0 [style=invis, weight=100, color=red] "merchants":f2:e -> "countries":f1:w [dir=forward, penwidth=3, color="#29235c", headlabel="1", taillabel="*"] "order_items":f0 -> "products":f0 [style=invis, weight=100, color=red] "order_items":f2:e -> "products":f1:w [dir=forward, penwidth=3, color="#29235c", headlabel="1", taillabel="*"] "products":f0 -> "merchants":f0 [style=invis, weight=100, color=red] "products":f3:e -> "merchants":f1:w [dir=forward, penwidth=3, color="#29235c", headlabel="1", taillabel="*"] "merchant_periods":f0 -> "merchants":f0 [style=invis, weight=100, color=red] "merchant_periods":f6:e -> "merchants":f6:w [dir=forward, penwidth=3, color="#29235c", headlabel="1", taillabel="*"] "order_items":f0 -> "orders":f0 [style=invis, weight=100, color=red] "order_items":f1:e -> "orders":f1:w [dir=forward, penwidth=3, color="#29235c", headlabel="1", taillabel="*"] "merchants":f0 -> "users":f0 [style=invis, weight=100, color=red] "merchants":f5:e -> "users":f1:w [dir=forward, penwidth=3, color="#29235c", headlabel="1", taillabel="*"] "products":f5:e -> "products_status":f0:w [penwidth=3, color="#29235c", arrowhead="none", arrowtail="none"] }