diff --git a/doc/diagrams/ERDiagram.mmd b/doc/diagrams/ERDiagram.mmd new file mode 100644 index 0000000..8273ccd --- /dev/null +++ b/doc/diagrams/ERDiagram.mmd @@ -0,0 +1,64 @@ +erDiagram +journey||--|{routesegments: "consists of" +routesegments||--||segment: "sorts" +segment||--|{departure: "consists of" +departure}|--|{station: "originates from" +departure}|--||vehicle: uses +vehicle||..|{line: "shared data" +segment}|--||vehicle: uses +stationlines}|..||station: "general connections" +stationlines}|..||line: groups + + +journey { + int id PK + string startstation + string endstation +} +routesegments { + int id PK + int journey FK + int segment FK + int segmentorder +} +segment { + int id PK + string ref + int startid FK + int endid FK + string vehicleid FK +} +departure { + int id PK + string ref + string direction + string vehicle FK + string vehiclename + string station FK + string stationname + string arrivaltime + string departuretime +} +station { + string id PK + string name +} +stationlines { + int id PK + string stationid FK + string lineid FK +} +vehicle { + string vehicleid PK + string name + string line FK +} +line { + string lineid PK + string name + string mode + string destination + string direction + string fgcolor + string bgcolor +} \ No newline at end of file diff --git a/doc/diagrams/flowchart_to_journey.mmd b/doc/diagrams/flowchart_to_journey.mmd new file mode 100644 index 0000000..fb1e09c --- /dev/null +++ b/doc/diagrams/flowchart_to_journey.mmd @@ -0,0 +1,8 @@ +flowchart TD +Start-->stat[Search Station]-->selstat[Select station] +selstat-->seldep["`Select departure: +vehicle, direction & time`"] +seldep-->selarr["`Select arrival station: +when & where to exit`"] --> sw{switch?} --yes-->seldep +sw--"no"-->fin([journey details]) + diff --git a/doc/diagrams/sequencediagram.mmd b/doc/diagrams/sequencediagram.mmd new file mode 100644 index 0000000..12363f5 --- /dev/null +++ b/doc/diagrams/sequencediagram.mmd @@ -0,0 +1,19 @@ +sequenceDiagram + participant api@{ "type": "entity"} as public transport API + participant ah as api_handler + participant ui as UI + participant th as transport_helper + participant db@{ "type":"database"} as database + +ui-->>ah: find Station +ah-->>api: GET request w/ stationname +api-->>ah: return json +ah-->>th: provide json Map +th-->>db: store object +db-->>th: return id +th-->>ah: return object +ah-->>ui: display data + + + +