Opening the shared document…
Diagram playground
Write a diagram as text and it renders here as you type. Canvas editing for six of ten notations. Nothing leaves your browser. Syntax reference ·
1
archlab 1.0 er
2
title "Parcel delivery"
3
description "One shipment, exactly one label, at most one signature, and the parcels that make it up."
4
5
@er
6
entity shipment "Shipment" [PostgreSQL]
7
desc "One dispatch to one address. Created when the picking is finished, never before."
8
attr id uuid pk
9
attr order_id uuid fk
10
attr carrier_id uuid fk
11
attr dispatched_at timestamp
12
entity carrier "Carrier"
13
attr id uuid pk
14
attr name string uk
15
attr tracking_url_template string
16
entity parcel "Parcel"
17
desc "A physical box. A shipment too heavy for one box becomes several, all travelling together."
18
attr id uuid pk
19
attr shipment_id uuid fk
20
attr weight_g integer
21
entity label "Shipping label"
22
desc "Printed once per shipment and never reprinted — a second label is a second shipment, because the carrier has already scanned the first."
23
attr shipment_id uuid pk fk
24
attr tracking_code string uk
25
attr printed_at timestamp
26
entity signature "Signature"
27
desc "Captured on delivery, when the service level asks for one. Most parcels are left in a safe place and have none."
28
attr shipment_id uuid pk fk
29
attr signed_by string
30
attr captured_at timestamp
31
32
carrier ||--o{ shipment : carries
33
shipment ||--|| label : "is printed as"
34
shipment ||--o| signature : "is signed for by"
35
parcel }|--|| shipment : "travels in"
Tab indents · Esc then Tab leaves the editor · worked examples
Read-only