-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathschema.dbml
82 lines (74 loc) · 1.88 KB
/
schema.dbml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
Table Customers {
CustomerID INTEGER [primary key]
Name TEXT [not null]
Address TEXT [not null]
State TEXT [not null]
PIN INT [not null]
ContactNumber TEXT [not null]
}
Table Sellers {
SellerID INTEGER [primary key]
Name TEXT [not null]
Address TEXT [not null]
State TEXT [not null]
PIN TEXT [not null]
ContactNumber TEXT [not null]
}
Table Hubs {
HubID INTEGER [primary key]
Location TEXT [not null]
State TEXT [not null]
PIN INT [not null]
Capacity INTEGER [not null]
ContactNumber TEXT [not null]
}
Table Routes {
RouteID INTEGER [primary key]
DeparturePoint TEXT [not null]
DestinationPoint TEXT [not null]
Mode TEXT [not null]
EDA TEXT [not null]
}
Table DeliveryPersons {
DeliveryPersonID INTEGER [primary key]
Name TEXT [not null]
ContactNumber TEXT [not null]
Address TEXT [not null]
HubID INTEGER [ref: > Hubs.HubID]
}
Table Staff {
StaffID INTEGER [primary key]
Name TEXT
Address TEXT
ContactNumber TEXT
HubID INTEGER [ref: > Hubs.HubID]
}
Table Managers {
ManagerID INTEGER [primary key]
Name TEXT [not null]
Address TEXT [not null]
ContactNumber TEXT [not null]
HubID INTEGER [ref: > Hubs.HubID]
}
Table Buyers {
BuyerID INTEGER [primary key]
Name TEXT [not null]
Address TEXT [not null]
ContactNumber TEXT [not null]
}
Table Parcels {
ParcelID INTEGER [primary key]
CustomerID INTEGER [ref: > Customers.CustomerID]
SellerID INTEGER [ref: > Sellers.SellerID]
SourceHubID INTEGER [ref: > Hubs.HubID]
DestinationHubID INTEGER [ref: > Hubs.HubID]
BuyerID INT [ref: > Buyers.BuyerID]
TrackingNumber TEXT
RouteID INT [ref: > Routes.RouteID]
Size TEXT [not null]
Weight INT [not null]
Destination TEXT [not null]
Status TEXT [not null]
OrderDate DATE [not null]
DeliveryDate DATE [not null]
}