Mermaid 源码(可维护)
erDiagram
exp_site ||--o{ exp_warehouse : has
exp_site ||--o{ exp_order : serves
exp_order ||--o{ exp_waybill : generates
exp_waybill ||--o{ exp_delivery_task : assigns
exp_courier ||--o{ exp_delivery_task : executes
exp_warehouse ||--o{ exp_inventory_item : stores
exp_site {
bigint id PK
string name
string address
}
exp_warehouse {
bigint id PK
bigint siteId FK
string code
}
exp_order {
bigint id PK
string orderNo
bigint userId FK
bigint siteId FK
int status
}
exp_waybill {
bigint id PK
bigint orderId FK
string trackNo
string carrierCode
}
exp_delivery_task {
bigint id PK
bigint waybillId FK
bigint courierId FK
int status
}
exp_courier {
bigint id PK
bigint userId FK
bigint siteId FK
}
exp_inventory_item {
bigint id PK
bigint warehouseId FK
string skuCode
int qty
}