Add initial DB layout

This commit is contained in:
GHOSCHT 2024-05-10 11:40:25 +02:00
parent fd99c8f8d3
commit 04d3c775f8
Signed by: ghoscht
GPG key ID: 2C2C1C62A5388E82
13 changed files with 488 additions and 151 deletions

19
Cargo.lock generated
View file

@ -27,6 +27,18 @@ dependencies = [
"pq-sys",
]
[[package]]
name = "diesel-derive-enum"
version = "2.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "81c5131a2895ef64741dad1d483f358c2a229a3a2d1b256778cdc5e146db64d4"
dependencies = [
"heck",
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "diesel_derives"
version = "2.1.4"
@ -54,6 +66,12 @@ version = "0.15.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b"
[[package]]
name = "heck"
version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8"
[[package]]
name = "itoa"
version = "1.0.11"
@ -102,6 +120,7 @@ name = "schnabu-server"
version = "0.1.0"
dependencies = [
"diesel",
"diesel-derive-enum",
"dotenvy",
"postgis_diesel",
]

View file

@ -7,5 +7,6 @@ edition = "2021"
[dependencies]
diesel = { version = "2.1.6", features = ["postgres"] }
diesel-derive-enum = { version = "2.1.0", features = ["postgres"] }
dotenvy = "0.15.7"
postgis_diesel = "2.3.1"

View file

@ -5,6 +5,7 @@
file = "src/schema.rs"
custom_type_derives = ["diesel::query_builder::QueryId"]
import_types = ["diesel::sql_types::*", "postgis_diesel::sql_types::*"]
patch_file = "patches/schema.patch"
[migrations_directory]
dir = "migrations"

View file

@ -1,434 +1,440 @@
<mxfile host="app.diagrams.net" modified="2024-05-05T14:58:14.714Z" agent="Mozilla/5.0 (X11; Linux x86_64; rv:125.0) Gecko/20100101 Firefox/125.0" etag="SfkdT1eB6I2t1j8bCzwo" version="24.3.1" type="device">
<mxfile host="app.diagrams.net" modified="2024-05-09T21:25:40.382Z" agent="Mozilla/5.0 (X11; Linux x86_64; rv:125.0) Gecko/20100101 Firefox/125.0" etag="ZsH9rSAqtpO87jJbNEqW" version="24.3.1" type="device">
<diagram name="Page-1" id="ZfipqI4hvDsRe4dU9eJn">
<mxGraphModel dx="1407" dy="750" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="850" pageHeight="1100" math="0" shadow="0">
<mxGraphModel dx="2179" dy="898" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="850" pageHeight="1100" math="0" shadow="0">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<mxCell id="03sitQUDjDdc8CLbrQEY-22" value="Users" style="shape=table;startSize=30;container=1;collapsible=1;childLayout=tableLayout;fixedRows=1;rowLines=0;fontStyle=1;align=center;resizeLast=1;html=1;" vertex="1" parent="1">
<mxGeometry x="250" y="330" width="180" height="150" as="geometry" />
<mxCell id="03sitQUDjDdc8CLbrQEY-22" value="Users" style="shape=table;startSize=30;container=1;collapsible=1;childLayout=tableLayout;fixedRows=1;rowLines=0;fontStyle=1;align=center;resizeLast=1;html=1;rounded=0;" parent="1" vertex="1">
<mxGeometry x="500" y="610" width="180" height="150" as="geometry" />
</mxCell>
<mxCell id="03sitQUDjDdc8CLbrQEY-23" value="" style="shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom=1;" vertex="1" parent="03sitQUDjDdc8CLbrQEY-22">
<mxCell id="03sitQUDjDdc8CLbrQEY-23" value="" style="shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom=1;rounded=0;" parent="03sitQUDjDdc8CLbrQEY-22" vertex="1">
<mxGeometry y="30" width="180" height="30" as="geometry" />
</mxCell>
<mxCell id="03sitQUDjDdc8CLbrQEY-24" value="PK" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;fontStyle=1;overflow=hidden;whiteSpace=wrap;html=1;" vertex="1" parent="03sitQUDjDdc8CLbrQEY-23">
<mxCell id="03sitQUDjDdc8CLbrQEY-24" value="PK" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;fontStyle=1;overflow=hidden;whiteSpace=wrap;html=1;rounded=0;" parent="03sitQUDjDdc8CLbrQEY-23" vertex="1">
<mxGeometry width="30" height="30" as="geometry">
<mxRectangle width="30" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="03sitQUDjDdc8CLbrQEY-25" value="UserID" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;fontStyle=5;overflow=hidden;whiteSpace=wrap;html=1;" vertex="1" parent="03sitQUDjDdc8CLbrQEY-23">
<mxCell id="03sitQUDjDdc8CLbrQEY-25" value="UserID" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;fontStyle=5;overflow=hidden;whiteSpace=wrap;html=1;rounded=0;" parent="03sitQUDjDdc8CLbrQEY-23" vertex="1">
<mxGeometry x="30" width="150" height="30" as="geometry">
<mxRectangle width="150" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="03sitQUDjDdc8CLbrQEY-26" value="" style="shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom=0;" vertex="1" parent="03sitQUDjDdc8CLbrQEY-22">
<mxCell id="03sitQUDjDdc8CLbrQEY-26" value="" style="shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom=0;rounded=0;" parent="03sitQUDjDdc8CLbrQEY-22" vertex="1">
<mxGeometry y="60" width="180" height="30" as="geometry" />
</mxCell>
<mxCell id="03sitQUDjDdc8CLbrQEY-27" value="" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;editable=1;overflow=hidden;whiteSpace=wrap;html=1;" vertex="1" parent="03sitQUDjDdc8CLbrQEY-26">
<mxCell id="03sitQUDjDdc8CLbrQEY-27" value="" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;editable=1;overflow=hidden;whiteSpace=wrap;html=1;rounded=0;" parent="03sitQUDjDdc8CLbrQEY-26" vertex="1">
<mxGeometry width="30" height="30" as="geometry">
<mxRectangle width="30" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="03sitQUDjDdc8CLbrQEY-28" value="UserName" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;whiteSpace=wrap;html=1;" vertex="1" parent="03sitQUDjDdc8CLbrQEY-26">
<mxCell id="03sitQUDjDdc8CLbrQEY-28" value="UserName" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;whiteSpace=wrap;html=1;rounded=0;" parent="03sitQUDjDdc8CLbrQEY-26" vertex="1">
<mxGeometry x="30" width="150" height="30" as="geometry">
<mxRectangle width="150" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="03sitQUDjDdc8CLbrQEY-29" value="" style="shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom=0;" vertex="1" parent="03sitQUDjDdc8CLbrQEY-22">
<mxCell id="ywnix-sB55ZwvuEVbHo9-35" style="shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom=0;rounded=0;" vertex="1" parent="03sitQUDjDdc8CLbrQEY-22">
<mxGeometry y="90" width="180" height="30" as="geometry" />
</mxCell>
<mxCell id="03sitQUDjDdc8CLbrQEY-30" value="" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;editable=1;overflow=hidden;whiteSpace=wrap;html=1;" vertex="1" parent="03sitQUDjDdc8CLbrQEY-29">
<mxCell id="ywnix-sB55ZwvuEVbHo9-36" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;editable=1;overflow=hidden;whiteSpace=wrap;html=1;rounded=0;" vertex="1" parent="ywnix-sB55ZwvuEVbHo9-35">
<mxGeometry width="30" height="30" as="geometry">
<mxRectangle width="30" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="03sitQUDjDdc8CLbrQEY-31" value="Name" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;whiteSpace=wrap;html=1;" vertex="1" parent="03sitQUDjDdc8CLbrQEY-29">
<mxCell id="ywnix-sB55ZwvuEVbHo9-37" value="UUID" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;whiteSpace=wrap;html=1;rounded=0;" vertex="1" parent="ywnix-sB55ZwvuEVbHo9-35">
<mxGeometry x="30" width="150" height="30" as="geometry">
<mxRectangle width="150" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="03sitQUDjDdc8CLbrQEY-32" value="" style="shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom=0;" vertex="1" parent="03sitQUDjDdc8CLbrQEY-22">
<mxCell id="ywnix-sB55ZwvuEVbHo9-39" style="shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom=0;rounded=0;" vertex="1" parent="03sitQUDjDdc8CLbrQEY-22">
<mxGeometry y="120" width="180" height="30" as="geometry" />
</mxCell>
<mxCell id="03sitQUDjDdc8CLbrQEY-33" value="" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;editable=1;overflow=hidden;whiteSpace=wrap;html=1;" vertex="1" parent="03sitQUDjDdc8CLbrQEY-32">
<mxCell id="ywnix-sB55ZwvuEVbHo9-40" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;editable=1;overflow=hidden;whiteSpace=wrap;html=1;rounded=0;" vertex="1" parent="ywnix-sB55ZwvuEVbHo9-39">
<mxGeometry width="30" height="30" as="geometry">
<mxRectangle width="30" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="03sitQUDjDdc8CLbrQEY-34" value="Biography" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;whiteSpace=wrap;html=1;" vertex="1" parent="03sitQUDjDdc8CLbrQEY-32">
<mxCell id="ywnix-sB55ZwvuEVbHo9-41" value="AvatarImageID" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;whiteSpace=wrap;html=1;rounded=0;" vertex="1" parent="ywnix-sB55ZwvuEVbHo9-39">
<mxGeometry x="30" width="150" height="30" as="geometry">
<mxRectangle width="150" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="03sitQUDjDdc8CLbrQEY-39" value="Nodes" style="shape=table;startSize=30;container=1;collapsible=1;childLayout=tableLayout;fixedRows=1;rowLines=0;fontStyle=1;align=center;resizeLast=1;html=1;" vertex="1" parent="1">
<mxGeometry y="170" width="180" height="150" as="geometry" />
<mxCell id="03sitQUDjDdc8CLbrQEY-39" value="Nodes" style="shape=table;startSize=30;container=1;collapsible=1;childLayout=tableLayout;fixedRows=1;rowLines=0;fontStyle=1;align=center;resizeLast=1;html=1;rounded=0;" parent="1" vertex="1">
<mxGeometry x="250" y="450" width="180" height="150" as="geometry" />
</mxCell>
<mxCell id="03sitQUDjDdc8CLbrQEY-40" value="" style="shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom=1;" vertex="1" parent="03sitQUDjDdc8CLbrQEY-39">
<mxCell id="03sitQUDjDdc8CLbrQEY-40" value="" style="shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom=1;rounded=0;" parent="03sitQUDjDdc8CLbrQEY-39" vertex="1">
<mxGeometry y="30" width="180" height="30" as="geometry" />
</mxCell>
<mxCell id="03sitQUDjDdc8CLbrQEY-41" value="PK" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;fontStyle=1;overflow=hidden;whiteSpace=wrap;html=1;" vertex="1" parent="03sitQUDjDdc8CLbrQEY-40">
<mxCell id="03sitQUDjDdc8CLbrQEY-41" value="PK" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;fontStyle=1;overflow=hidden;whiteSpace=wrap;html=1;rounded=0;" parent="03sitQUDjDdc8CLbrQEY-40" vertex="1">
<mxGeometry width="30" height="30" as="geometry">
<mxRectangle width="30" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="03sitQUDjDdc8CLbrQEY-42" value="NodeID" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;fontStyle=5;overflow=hidden;whiteSpace=wrap;html=1;" vertex="1" parent="03sitQUDjDdc8CLbrQEY-40">
<mxCell id="03sitQUDjDdc8CLbrQEY-42" value="NodeID" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;fontStyle=5;overflow=hidden;whiteSpace=wrap;html=1;rounded=0;" parent="03sitQUDjDdc8CLbrQEY-40" vertex="1">
<mxGeometry x="30" width="150" height="30" as="geometry">
<mxRectangle width="150" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="03sitQUDjDdc8CLbrQEY-43" value="" style="shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom=0;" vertex="1" parent="03sitQUDjDdc8CLbrQEY-39">
<mxCell id="03sitQUDjDdc8CLbrQEY-43" value="" style="shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom=0;rounded=0;" parent="03sitQUDjDdc8CLbrQEY-39" vertex="1">
<mxGeometry y="60" width="180" height="30" as="geometry" />
</mxCell>
<mxCell id="03sitQUDjDdc8CLbrQEY-44" value="" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;editable=1;overflow=hidden;whiteSpace=wrap;html=1;" vertex="1" parent="03sitQUDjDdc8CLbrQEY-43">
<mxCell id="03sitQUDjDdc8CLbrQEY-44" value="" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;editable=1;overflow=hidden;whiteSpace=wrap;html=1;rounded=0;" parent="03sitQUDjDdc8CLbrQEY-43" vertex="1">
<mxGeometry width="30" height="30" as="geometry">
<mxRectangle width="30" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="03sitQUDjDdc8CLbrQEY-45" value="Coordinates" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;whiteSpace=wrap;html=1;" vertex="1" parent="03sitQUDjDdc8CLbrQEY-43">
<mxCell id="03sitQUDjDdc8CLbrQEY-45" value="Coordinates" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;whiteSpace=wrap;html=1;rounded=0;" parent="03sitQUDjDdc8CLbrQEY-43" vertex="1">
<mxGeometry x="30" width="150" height="30" as="geometry">
<mxRectangle width="150" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="03sitQUDjDdc8CLbrQEY-46" value="" style="shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom=0;" vertex="1" parent="03sitQUDjDdc8CLbrQEY-39">
<mxCell id="03sitQUDjDdc8CLbrQEY-46" value="" style="shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom=0;rounded=0;" parent="03sitQUDjDdc8CLbrQEY-39" vertex="1">
<mxGeometry y="90" width="180" height="30" as="geometry" />
</mxCell>
<mxCell id="03sitQUDjDdc8CLbrQEY-47" value="" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;editable=1;overflow=hidden;whiteSpace=wrap;html=1;" vertex="1" parent="03sitQUDjDdc8CLbrQEY-46">
<mxCell id="03sitQUDjDdc8CLbrQEY-47" value="" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;editable=1;overflow=hidden;whiteSpace=wrap;html=1;rounded=0;" parent="03sitQUDjDdc8CLbrQEY-46" vertex="1">
<mxGeometry width="30" height="30" as="geometry">
<mxRectangle width="30" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="03sitQUDjDdc8CLbrQEY-48" value="Name" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;whiteSpace=wrap;html=1;" vertex="1" parent="03sitQUDjDdc8CLbrQEY-46">
<mxCell id="03sitQUDjDdc8CLbrQEY-48" value="Name" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;whiteSpace=wrap;html=1;rounded=0;" parent="03sitQUDjDdc8CLbrQEY-46" vertex="1">
<mxGeometry x="30" width="150" height="30" as="geometry">
<mxRectangle width="150" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="03sitQUDjDdc8CLbrQEY-49" value="" style="shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom=0;" vertex="1" parent="03sitQUDjDdc8CLbrQEY-39">
<mxCell id="03sitQUDjDdc8CLbrQEY-49" value="" style="shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom=0;rounded=0;" parent="03sitQUDjDdc8CLbrQEY-39" vertex="1">
<mxGeometry y="120" width="180" height="30" as="geometry" />
</mxCell>
<mxCell id="03sitQUDjDdc8CLbrQEY-50" value="" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;editable=1;overflow=hidden;whiteSpace=wrap;html=1;" vertex="1" parent="03sitQUDjDdc8CLbrQEY-49">
<mxCell id="03sitQUDjDdc8CLbrQEY-50" value="" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;editable=1;overflow=hidden;whiteSpace=wrap;html=1;rounded=0;" parent="03sitQUDjDdc8CLbrQEY-49" vertex="1">
<mxGeometry width="30" height="30" as="geometry">
<mxRectangle width="30" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="03sitQUDjDdc8CLbrQEY-51" value="NodeType" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;whiteSpace=wrap;html=1;" vertex="1" parent="03sitQUDjDdc8CLbrQEY-49">
<mxCell id="03sitQUDjDdc8CLbrQEY-51" value="NodeType" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;whiteSpace=wrap;html=1;rounded=0;" parent="03sitQUDjDdc8CLbrQEY-49" vertex="1">
<mxGeometry x="30" width="150" height="30" as="geometry">
<mxRectangle width="150" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="03sitQUDjDdc8CLbrQEY-65" value="" style="edgeStyle=entityRelationEdgeStyle;fontSize=12;html=1;endArrow=ERzeroToOne;startArrow=ERmandOne;rounded=0;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="03sitQUDjDdc8CLbrQEY-40" target="03sitQUDjDdc8CLbrQEY-70">
<mxCell id="03sitQUDjDdc8CLbrQEY-65" value="" style="edgeStyle=entityRelationEdgeStyle;fontSize=12;html=1;endArrow=ERzeroToOne;startArrow=ERmandOne;rounded=0;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" parent="1" source="03sitQUDjDdc8CLbrQEY-40" target="03sitQUDjDdc8CLbrQEY-70" edge="1">
<mxGeometry width="100" height="100" relative="1" as="geometry">
<mxPoint x="-40" y="260" as="sourcePoint" />
<mxPoint x="30" y="350" as="targetPoint" />
<mxPoint x="210" y="540" as="sourcePoint" />
<mxPoint x="280" y="630" as="targetPoint" />
<Array as="points">
<mxPoint x="-10" y="300" />
<mxPoint x="240" y="580" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="03sitQUDjDdc8CLbrQEY-66" value="Restaurants" style="shape=table;startSize=30;container=1;collapsible=1;childLayout=tableLayout;fixedRows=1;rowLines=0;fontStyle=1;align=center;resizeLast=1;html=1;" vertex="1" parent="1">
<mxGeometry x="250" y="90" width="180" height="210" as="geometry" />
<mxCell id="03sitQUDjDdc8CLbrQEY-66" value="Restaurants" style="shape=table;startSize=30;container=1;collapsible=1;childLayout=tableLayout;fixedRows=1;rowLines=0;fontStyle=1;align=center;resizeLast=1;html=1;rounded=0;" parent="1" vertex="1">
<mxGeometry x="500" y="370" width="180" height="150" as="geometry" />
</mxCell>
<mxCell id="03sitQUDjDdc8CLbrQEY-67" value="" style="shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom=1;" vertex="1" parent="03sitQUDjDdc8CLbrQEY-66">
<mxCell id="03sitQUDjDdc8CLbrQEY-67" value="" style="shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom=1;rounded=0;" parent="03sitQUDjDdc8CLbrQEY-66" vertex="1">
<mxGeometry y="30" width="180" height="30" as="geometry" />
</mxCell>
<mxCell id="03sitQUDjDdc8CLbrQEY-68" value="PK" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;fontStyle=1;overflow=hidden;whiteSpace=wrap;html=1;" vertex="1" parent="03sitQUDjDdc8CLbrQEY-67">
<mxCell id="03sitQUDjDdc8CLbrQEY-68" value="PK" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;fontStyle=1;overflow=hidden;whiteSpace=wrap;html=1;rounded=0;" parent="03sitQUDjDdc8CLbrQEY-67" vertex="1">
<mxGeometry width="30" height="30" as="geometry">
<mxRectangle width="30" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="03sitQUDjDdc8CLbrQEY-69" value="RestaurantID" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;fontStyle=5;overflow=hidden;whiteSpace=wrap;html=1;" vertex="1" parent="03sitQUDjDdc8CLbrQEY-67">
<mxCell id="03sitQUDjDdc8CLbrQEY-69" value="RestaurantID" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;fontStyle=5;overflow=hidden;whiteSpace=wrap;html=1;rounded=0;" parent="03sitQUDjDdc8CLbrQEY-67" vertex="1">
<mxGeometry x="30" width="150" height="30" as="geometry">
<mxRectangle width="150" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="03sitQUDjDdc8CLbrQEY-70" value="" style="shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom=0;" vertex="1" parent="03sitQUDjDdc8CLbrQEY-66">
<mxCell id="03sitQUDjDdc8CLbrQEY-70" value="" style="shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom=0;rounded=0;" parent="03sitQUDjDdc8CLbrQEY-66" vertex="1">
<mxGeometry y="60" width="180" height="30" as="geometry" />
</mxCell>
<mxCell id="03sitQUDjDdc8CLbrQEY-71" value="FK" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;editable=1;overflow=hidden;whiteSpace=wrap;html=1;" vertex="1" parent="03sitQUDjDdc8CLbrQEY-70">
<mxCell id="03sitQUDjDdc8CLbrQEY-71" value="FK" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;editable=1;overflow=hidden;whiteSpace=wrap;html=1;rounded=0;" parent="03sitQUDjDdc8CLbrQEY-70" vertex="1">
<mxGeometry width="30" height="30" as="geometry">
<mxRectangle width="30" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="03sitQUDjDdc8CLbrQEY-72" value="NodeID" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;whiteSpace=wrap;html=1;" vertex="1" parent="03sitQUDjDdc8CLbrQEY-70">
<mxCell id="03sitQUDjDdc8CLbrQEY-72" value="NodeID" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;whiteSpace=wrap;html=1;rounded=0;" parent="03sitQUDjDdc8CLbrQEY-70" vertex="1">
<mxGeometry x="30" width="150" height="30" as="geometry">
<mxRectangle width="150" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="03sitQUDjDdc8CLbrQEY-73" value="" style="shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom=0;" vertex="1" parent="03sitQUDjDdc8CLbrQEY-66">
<mxCell id="03sitQUDjDdc8CLbrQEY-73" value="" style="shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom=0;rounded=0;" parent="03sitQUDjDdc8CLbrQEY-66" vertex="1">
<mxGeometry y="90" width="180" height="30" as="geometry" />
</mxCell>
<mxCell id="03sitQUDjDdc8CLbrQEY-74" value="" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;editable=1;overflow=hidden;whiteSpace=wrap;html=1;" vertex="1" parent="03sitQUDjDdc8CLbrQEY-73">
<mxCell id="03sitQUDjDdc8CLbrQEY-74" value="" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;editable=1;overflow=hidden;whiteSpace=wrap;html=1;rounded=0;" parent="03sitQUDjDdc8CLbrQEY-73" vertex="1">
<mxGeometry width="30" height="30" as="geometry">
<mxRectangle width="30" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="03sitQUDjDdc8CLbrQEY-75" value="Address" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;whiteSpace=wrap;html=1;" vertex="1" parent="03sitQUDjDdc8CLbrQEY-73">
<mxCell id="03sitQUDjDdc8CLbrQEY-75" value="Address" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;whiteSpace=wrap;html=1;rounded=0;" parent="03sitQUDjDdc8CLbrQEY-73" vertex="1">
<mxGeometry x="30" width="150" height="30" as="geometry">
<mxRectangle width="150" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="03sitQUDjDdc8CLbrQEY-76" value="" style="shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom=0;" vertex="1" parent="03sitQUDjDdc8CLbrQEY-66">
<mxCell id="03sitQUDjDdc8CLbrQEY-94" style="shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom=0;rounded=0;" parent="03sitQUDjDdc8CLbrQEY-66" vertex="1">
<mxGeometry y="120" width="180" height="30" as="geometry" />
</mxCell>
<mxCell id="03sitQUDjDdc8CLbrQEY-77" value="" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;editable=1;overflow=hidden;whiteSpace=wrap;html=1;" vertex="1" parent="03sitQUDjDdc8CLbrQEY-76">
<mxCell id="03sitQUDjDdc8CLbrQEY-95" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;editable=1;overflow=hidden;whiteSpace=wrap;html=1;rounded=0;" parent="03sitQUDjDdc8CLbrQEY-94" vertex="1">
<mxGeometry width="30" height="30" as="geometry">
<mxRectangle width="30" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="03sitQUDjDdc8CLbrQEY-78" value="Type" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;whiteSpace=wrap;html=1;" vertex="1" parent="03sitQUDjDdc8CLbrQEY-76">
<mxCell id="03sitQUDjDdc8CLbrQEY-96" value="Price" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;whiteSpace=wrap;html=1;rounded=0;" parent="03sitQUDjDdc8CLbrQEY-94" vertex="1">
<mxGeometry x="30" width="150" height="30" as="geometry">
<mxRectangle width="150" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="03sitQUDjDdc8CLbrQEY-88" style="shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom=0;" vertex="1" parent="03sitQUDjDdc8CLbrQEY-66">
<mxGeometry y="150" width="180" height="30" as="geometry" />
<mxCell id="03sitQUDjDdc8CLbrQEY-97" value="Meals" style="shape=table;startSize=30;container=1;collapsible=1;childLayout=tableLayout;fixedRows=1;rowLines=0;fontStyle=1;align=center;resizeLast=1;html=1;rounded=0;" parent="1" vertex="1">
<mxGeometry x="1000" y="450" width="180" height="240" as="geometry" />
</mxCell>
<mxCell id="03sitQUDjDdc8CLbrQEY-89" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;editable=1;overflow=hidden;whiteSpace=wrap;html=1;" vertex="1" parent="03sitQUDjDdc8CLbrQEY-88">
<mxGeometry width="30" height="30" as="geometry">
<mxRectangle width="30" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="03sitQUDjDdc8CLbrQEY-90" value="Style" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;whiteSpace=wrap;html=1;" vertex="1" parent="03sitQUDjDdc8CLbrQEY-88">
<mxGeometry x="30" width="150" height="30" as="geometry">
<mxRectangle width="150" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="03sitQUDjDdc8CLbrQEY-94" style="shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom=0;" vertex="1" parent="03sitQUDjDdc8CLbrQEY-66">
<mxGeometry y="180" width="180" height="30" as="geometry" />
</mxCell>
<mxCell id="03sitQUDjDdc8CLbrQEY-95" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;editable=1;overflow=hidden;whiteSpace=wrap;html=1;" vertex="1" parent="03sitQUDjDdc8CLbrQEY-94">
<mxGeometry width="30" height="30" as="geometry">
<mxRectangle width="30" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="03sitQUDjDdc8CLbrQEY-96" value="Price" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;whiteSpace=wrap;html=1;" vertex="1" parent="03sitQUDjDdc8CLbrQEY-94">
<mxGeometry x="30" width="150" height="30" as="geometry">
<mxRectangle width="150" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="03sitQUDjDdc8CLbrQEY-97" value="Meals" style="shape=table;startSize=30;container=1;collapsible=1;childLayout=tableLayout;fixedRows=1;rowLines=0;fontStyle=1;align=center;resizeLast=1;html=1;" vertex="1" parent="1">
<mxGeometry x="750" y="170" width="180" height="270" as="geometry" />
</mxCell>
<mxCell id="03sitQUDjDdc8CLbrQEY-98" value="" style="shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom=1;" vertex="1" parent="03sitQUDjDdc8CLbrQEY-97">
<mxCell id="03sitQUDjDdc8CLbrQEY-98" value="" style="shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom=1;rounded=0;" parent="03sitQUDjDdc8CLbrQEY-97" vertex="1">
<mxGeometry y="30" width="180" height="30" as="geometry" />
</mxCell>
<mxCell id="03sitQUDjDdc8CLbrQEY-99" value="PK" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;fontStyle=1;overflow=hidden;whiteSpace=wrap;html=1;" vertex="1" parent="03sitQUDjDdc8CLbrQEY-98">
<mxCell id="03sitQUDjDdc8CLbrQEY-99" value="PK" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;fontStyle=1;overflow=hidden;whiteSpace=wrap;html=1;rounded=0;" parent="03sitQUDjDdc8CLbrQEY-98" vertex="1">
<mxGeometry width="30" height="30" as="geometry">
<mxRectangle width="30" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="03sitQUDjDdc8CLbrQEY-100" value="MealID" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;fontStyle=5;overflow=hidden;whiteSpace=wrap;html=1;" vertex="1" parent="03sitQUDjDdc8CLbrQEY-98">
<mxCell id="03sitQUDjDdc8CLbrQEY-100" value="MealID" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;fontStyle=5;overflow=hidden;whiteSpace=wrap;html=1;rounded=0;" parent="03sitQUDjDdc8CLbrQEY-98" vertex="1">
<mxGeometry x="30" width="150" height="30" as="geometry">
<mxRectangle width="150" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="03sitQUDjDdc8CLbrQEY-101" value="" style="shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom=0;" vertex="1" parent="03sitQUDjDdc8CLbrQEY-97">
<mxCell id="03sitQUDjDdc8CLbrQEY-101" value="" style="shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom=0;rounded=0;" parent="03sitQUDjDdc8CLbrQEY-97" vertex="1">
<mxGeometry y="60" width="180" height="30" as="geometry" />
</mxCell>
<mxCell id="03sitQUDjDdc8CLbrQEY-102" value="FK" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;editable=1;overflow=hidden;whiteSpace=wrap;html=1;" vertex="1" parent="03sitQUDjDdc8CLbrQEY-101">
<mxCell id="03sitQUDjDdc8CLbrQEY-102" value="FK" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;editable=1;overflow=hidden;whiteSpace=wrap;html=1;rounded=0;" parent="03sitQUDjDdc8CLbrQEY-101" vertex="1">
<mxGeometry width="30" height="30" as="geometry">
<mxRectangle width="30" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="03sitQUDjDdc8CLbrQEY-103" value="RestaurantRatingID" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;whiteSpace=wrap;html=1;" vertex="1" parent="03sitQUDjDdc8CLbrQEY-101">
<mxCell id="03sitQUDjDdc8CLbrQEY-103" value="RestaurantRatingID" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;whiteSpace=wrap;html=1;rounded=0;" parent="03sitQUDjDdc8CLbrQEY-101" vertex="1">
<mxGeometry x="30" width="150" height="30" as="geometry">
<mxRectangle width="150" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="03sitQUDjDdc8CLbrQEY-161" style="shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom=0;" vertex="1" parent="03sitQUDjDdc8CLbrQEY-97">
<mxCell id="03sitQUDjDdc8CLbrQEY-124" style="shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom=0;rounded=0;" parent="03sitQUDjDdc8CLbrQEY-97" vertex="1">
<mxGeometry y="90" width="180" height="30" as="geometry" />
</mxCell>
<mxCell id="03sitQUDjDdc8CLbrQEY-162" value="FK" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;editable=1;overflow=hidden;whiteSpace=wrap;html=1;" vertex="1" parent="03sitQUDjDdc8CLbrQEY-161">
<mxCell id="03sitQUDjDdc8CLbrQEY-125" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;editable=1;overflow=hidden;whiteSpace=wrap;html=1;rounded=0;" parent="03sitQUDjDdc8CLbrQEY-124" vertex="1">
<mxGeometry width="30" height="30" as="geometry">
<mxRectangle width="30" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="03sitQUDjDdc8CLbrQEY-163" value="ImageID" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;whiteSpace=wrap;html=1;" vertex="1" parent="03sitQUDjDdc8CLbrQEY-161">
<mxCell id="03sitQUDjDdc8CLbrQEY-126" value="Name" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;whiteSpace=wrap;html=1;rounded=0;" parent="03sitQUDjDdc8CLbrQEY-124" vertex="1">
<mxGeometry x="30" width="150" height="30" as="geometry">
<mxRectangle width="150" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="03sitQUDjDdc8CLbrQEY-124" style="shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom=0;" vertex="1" parent="03sitQUDjDdc8CLbrQEY-97">
<mxCell id="03sitQUDjDdc8CLbrQEY-104" value="" style="shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom=0;rounded=0;" parent="03sitQUDjDdc8CLbrQEY-97" vertex="1">
<mxGeometry y="120" width="180" height="30" as="geometry" />
</mxCell>
<mxCell id="03sitQUDjDdc8CLbrQEY-125" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;editable=1;overflow=hidden;whiteSpace=wrap;html=1;" vertex="1" parent="03sitQUDjDdc8CLbrQEY-124">
<mxCell id="03sitQUDjDdc8CLbrQEY-105" value="" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;editable=1;overflow=hidden;whiteSpace=wrap;html=1;rounded=0;" parent="03sitQUDjDdc8CLbrQEY-104" vertex="1">
<mxGeometry width="30" height="30" as="geometry">
<mxRectangle width="30" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="03sitQUDjDdc8CLbrQEY-126" value="Name" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;whiteSpace=wrap;html=1;" vertex="1" parent="03sitQUDjDdc8CLbrQEY-124">
<mxCell id="03sitQUDjDdc8CLbrQEY-106" value="Rating" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;whiteSpace=wrap;html=1;rounded=0;" parent="03sitQUDjDdc8CLbrQEY-104" vertex="1">
<mxGeometry x="30" width="150" height="30" as="geometry">
<mxRectangle width="150" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="03sitQUDjDdc8CLbrQEY-104" value="" style="shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom=0;" vertex="1" parent="03sitQUDjDdc8CLbrQEY-97">
<mxCell id="03sitQUDjDdc8CLbrQEY-116" style="shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom=0;rounded=0;" parent="03sitQUDjDdc8CLbrQEY-97" vertex="1">
<mxGeometry y="150" width="180" height="30" as="geometry" />
</mxCell>
<mxCell id="03sitQUDjDdc8CLbrQEY-105" value="" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;editable=1;overflow=hidden;whiteSpace=wrap;html=1;" vertex="1" parent="03sitQUDjDdc8CLbrQEY-104">
<mxCell id="03sitQUDjDdc8CLbrQEY-117" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;editable=1;overflow=hidden;whiteSpace=wrap;html=1;rounded=0;" parent="03sitQUDjDdc8CLbrQEY-116" vertex="1">
<mxGeometry width="30" height="30" as="geometry">
<mxRectangle width="30" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="03sitQUDjDdc8CLbrQEY-106" value="Rating" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;whiteSpace=wrap;html=1;" vertex="1" parent="03sitQUDjDdc8CLbrQEY-104">
<mxCell id="03sitQUDjDdc8CLbrQEY-118" value="Price" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;whiteSpace=wrap;html=1;rounded=0;" parent="03sitQUDjDdc8CLbrQEY-116" vertex="1">
<mxGeometry x="30" width="150" height="30" as="geometry">
<mxRectangle width="150" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="03sitQUDjDdc8CLbrQEY-116" style="shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom=0;" vertex="1" parent="03sitQUDjDdc8CLbrQEY-97">
<mxCell id="03sitQUDjDdc8CLbrQEY-121" style="shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom=0;rounded=0;" parent="03sitQUDjDdc8CLbrQEY-97" vertex="1">
<mxGeometry y="180" width="180" height="30" as="geometry" />
</mxCell>
<mxCell id="03sitQUDjDdc8CLbrQEY-117" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;editable=1;overflow=hidden;whiteSpace=wrap;html=1;" vertex="1" parent="03sitQUDjDdc8CLbrQEY-116">
<mxCell id="03sitQUDjDdc8CLbrQEY-122" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;editable=1;overflow=hidden;whiteSpace=wrap;html=1;rounded=0;" parent="03sitQUDjDdc8CLbrQEY-121" vertex="1">
<mxGeometry width="30" height="30" as="geometry">
<mxRectangle width="30" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="03sitQUDjDdc8CLbrQEY-118" value="Price" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;whiteSpace=wrap;html=1;" vertex="1" parent="03sitQUDjDdc8CLbrQEY-116">
<mxCell id="03sitQUDjDdc8CLbrQEY-123" value="Date" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;whiteSpace=wrap;html=1;rounded=0;" parent="03sitQUDjDdc8CLbrQEY-121" vertex="1">
<mxGeometry x="30" width="150" height="30" as="geometry">
<mxRectangle width="150" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="03sitQUDjDdc8CLbrQEY-121" style="shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom=0;" vertex="1" parent="03sitQUDjDdc8CLbrQEY-97">
<mxCell id="03sitQUDjDdc8CLbrQEY-127" style="shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom=0;rounded=0;" parent="03sitQUDjDdc8CLbrQEY-97" vertex="1">
<mxGeometry y="210" width="180" height="30" as="geometry" />
</mxCell>
<mxCell id="03sitQUDjDdc8CLbrQEY-122" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;editable=1;overflow=hidden;whiteSpace=wrap;html=1;" vertex="1" parent="03sitQUDjDdc8CLbrQEY-121">
<mxCell id="03sitQUDjDdc8CLbrQEY-128" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;editable=1;overflow=hidden;whiteSpace=wrap;html=1;rounded=0;" parent="03sitQUDjDdc8CLbrQEY-127" vertex="1">
<mxGeometry width="30" height="30" as="geometry">
<mxRectangle width="30" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="03sitQUDjDdc8CLbrQEY-123" value="Date" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;whiteSpace=wrap;html=1;" vertex="1" parent="03sitQUDjDdc8CLbrQEY-121">
<mxCell id="03sitQUDjDdc8CLbrQEY-129" value="Note" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;whiteSpace=wrap;html=1;rounded=0;" parent="03sitQUDjDdc8CLbrQEY-127" vertex="1">
<mxGeometry x="30" width="150" height="30" as="geometry">
<mxRectangle width="150" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="03sitQUDjDdc8CLbrQEY-127" style="shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom=0;" vertex="1" parent="03sitQUDjDdc8CLbrQEY-97">
<mxGeometry y="240" width="180" height="30" as="geometry" />
<mxCell id="03sitQUDjDdc8CLbrQEY-130" value="RestaurantRating" style="shape=table;startSize=30;container=1;collapsible=1;childLayout=tableLayout;fixedRows=1;rowLines=0;fontStyle=1;align=center;resizeLast=1;html=1;rounded=0;" parent="1" vertex="1">
<mxGeometry x="750" y="450" width="180" height="150" as="geometry" />
</mxCell>
<mxCell id="03sitQUDjDdc8CLbrQEY-128" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;editable=1;overflow=hidden;whiteSpace=wrap;html=1;" vertex="1" parent="03sitQUDjDdc8CLbrQEY-127">
<mxGeometry width="30" height="30" as="geometry">
<mxRectangle width="30" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="03sitQUDjDdc8CLbrQEY-129" value="Note" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;whiteSpace=wrap;html=1;" vertex="1" parent="03sitQUDjDdc8CLbrQEY-127">
<mxGeometry x="30" width="150" height="30" as="geometry">
<mxRectangle width="150" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="03sitQUDjDdc8CLbrQEY-130" value="RestaurantRating" style="shape=table;startSize=30;container=1;collapsible=1;childLayout=tableLayout;fixedRows=1;rowLines=0;fontStyle=1;align=center;resizeLast=1;html=1;" vertex="1" parent="1">
<mxGeometry x="500" y="170" width="180" height="150" as="geometry" />
</mxCell>
<mxCell id="03sitQUDjDdc8CLbrQEY-131" value="" style="shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom=1;" vertex="1" parent="03sitQUDjDdc8CLbrQEY-130">
<mxCell id="03sitQUDjDdc8CLbrQEY-131" value="" style="shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom=1;rounded=0;" parent="03sitQUDjDdc8CLbrQEY-130" vertex="1">
<mxGeometry y="30" width="180" height="30" as="geometry" />
</mxCell>
<mxCell id="03sitQUDjDdc8CLbrQEY-132" value="PK" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;fontStyle=1;overflow=hidden;whiteSpace=wrap;html=1;" vertex="1" parent="03sitQUDjDdc8CLbrQEY-131">
<mxCell id="03sitQUDjDdc8CLbrQEY-132" value="PK" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;fontStyle=1;overflow=hidden;whiteSpace=wrap;html=1;rounded=0;" parent="03sitQUDjDdc8CLbrQEY-131" vertex="1">
<mxGeometry width="30" height="30" as="geometry">
<mxRectangle width="30" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="03sitQUDjDdc8CLbrQEY-133" value="RestaurantRatingID" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;fontStyle=5;overflow=hidden;whiteSpace=wrap;html=1;" vertex="1" parent="03sitQUDjDdc8CLbrQEY-131">
<mxCell id="03sitQUDjDdc8CLbrQEY-133" value="RestaurantRatingID" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;fontStyle=5;overflow=hidden;whiteSpace=wrap;html=1;rounded=0;" parent="03sitQUDjDdc8CLbrQEY-131" vertex="1">
<mxGeometry x="30" width="150" height="30" as="geometry">
<mxRectangle width="150" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="03sitQUDjDdc8CLbrQEY-134" value="" style="shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom=0;" vertex="1" parent="03sitQUDjDdc8CLbrQEY-130">
<mxCell id="03sitQUDjDdc8CLbrQEY-134" value="" style="shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom=0;rounded=0;" parent="03sitQUDjDdc8CLbrQEY-130" vertex="1">
<mxGeometry y="60" width="180" height="30" as="geometry" />
</mxCell>
<mxCell id="03sitQUDjDdc8CLbrQEY-135" value="FK" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;editable=1;overflow=hidden;whiteSpace=wrap;html=1;" vertex="1" parent="03sitQUDjDdc8CLbrQEY-134">
<mxCell id="03sitQUDjDdc8CLbrQEY-135" value="FK" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;editable=1;overflow=hidden;whiteSpace=wrap;html=1;rounded=0;" parent="03sitQUDjDdc8CLbrQEY-134" vertex="1">
<mxGeometry width="30" height="30" as="geometry">
<mxRectangle width="30" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="03sitQUDjDdc8CLbrQEY-136" value="RestaurantID" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;whiteSpace=wrap;html=1;" vertex="1" parent="03sitQUDjDdc8CLbrQEY-134">
<mxCell id="03sitQUDjDdc8CLbrQEY-136" value="RestaurantID" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;whiteSpace=wrap;html=1;rounded=0;" parent="03sitQUDjDdc8CLbrQEY-134" vertex="1">
<mxGeometry x="30" width="150" height="30" as="geometry">
<mxRectangle width="150" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="03sitQUDjDdc8CLbrQEY-137" value="" style="shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom=0;" vertex="1" parent="03sitQUDjDdc8CLbrQEY-130">
<mxCell id="03sitQUDjDdc8CLbrQEY-137" value="" style="shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom=0;rounded=0;" parent="03sitQUDjDdc8CLbrQEY-130" vertex="1">
<mxGeometry y="90" width="180" height="30" as="geometry" />
</mxCell>
<mxCell id="03sitQUDjDdc8CLbrQEY-138" value="FK" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;editable=1;overflow=hidden;whiteSpace=wrap;html=1;" vertex="1" parent="03sitQUDjDdc8CLbrQEY-137">
<mxCell id="03sitQUDjDdc8CLbrQEY-138" value="FK" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;editable=1;overflow=hidden;whiteSpace=wrap;html=1;rounded=0;" parent="03sitQUDjDdc8CLbrQEY-137" vertex="1">
<mxGeometry width="30" height="30" as="geometry">
<mxRectangle width="30" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="03sitQUDjDdc8CLbrQEY-139" value="UserID" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;whiteSpace=wrap;html=1;" vertex="1" parent="03sitQUDjDdc8CLbrQEY-137">
<mxCell id="03sitQUDjDdc8CLbrQEY-139" value="UserID" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;whiteSpace=wrap;html=1;rounded=0;" parent="03sitQUDjDdc8CLbrQEY-137" vertex="1">
<mxGeometry x="30" width="150" height="30" as="geometry">
<mxRectangle width="150" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="03sitQUDjDdc8CLbrQEY-140" value="" style="shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom=0;" vertex="1" parent="03sitQUDjDdc8CLbrQEY-130">
<mxCell id="ywnix-sB55ZwvuEVbHo9-19" style="shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom=0;rounded=0;" vertex="1" parent="03sitQUDjDdc8CLbrQEY-130">
<mxGeometry y="120" width="180" height="30" as="geometry" />
</mxCell>
<mxCell id="03sitQUDjDdc8CLbrQEY-141" value="" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;editable=1;overflow=hidden;whiteSpace=wrap;html=1;" vertex="1" parent="03sitQUDjDdc8CLbrQEY-140">
<mxCell id="ywnix-sB55ZwvuEVbHo9-20" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;editable=1;overflow=hidden;whiteSpace=wrap;html=1;rounded=0;" vertex="1" parent="ywnix-sB55ZwvuEVbHo9-19">
<mxGeometry width="30" height="30" as="geometry">
<mxRectangle width="30" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="03sitQUDjDdc8CLbrQEY-142" value="Rating" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;whiteSpace=wrap;html=1;" vertex="1" parent="03sitQUDjDdc8CLbrQEY-140">
<mxCell id="ywnix-sB55ZwvuEVbHo9-21" value="Note" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;whiteSpace=wrap;html=1;rounded=0;" vertex="1" parent="ywnix-sB55ZwvuEVbHo9-19">
<mxGeometry x="30" width="150" height="30" as="geometry">
<mxRectangle width="150" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="03sitQUDjDdc8CLbrQEY-144" value="" style="edgeStyle=entityRelationEdgeStyle;fontSize=12;html=1;endArrow=ERzeroToMany;startArrow=ERzeroToOne;rounded=0;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="03sitQUDjDdc8CLbrQEY-67" target="03sitQUDjDdc8CLbrQEY-134">
<mxCell id="03sitQUDjDdc8CLbrQEY-144" value="" style="edgeStyle=entityRelationEdgeStyle;fontSize=12;html=1;endArrow=ERzeroToMany;startArrow=ERzeroToOne;rounded=0;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" parent="1" source="03sitQUDjDdc8CLbrQEY-67" target="03sitQUDjDdc8CLbrQEY-134" edge="1">
<mxGeometry width="100" height="100" relative="1" as="geometry">
<mxPoint x="460" y="470" as="sourcePoint" />
<mxPoint x="560" y="370" as="targetPoint" />
<mxPoint x="710" y="750" as="sourcePoint" />
<mxPoint x="810" y="650" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="03sitQUDjDdc8CLbrQEY-145" value="" style="edgeStyle=entityRelationEdgeStyle;fontSize=12;html=1;endArrow=ERzeroToMany;startArrow=ERzeroToOne;rounded=0;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="03sitQUDjDdc8CLbrQEY-131" target="03sitQUDjDdc8CLbrQEY-101">
<mxCell id="03sitQUDjDdc8CLbrQEY-145" value="" style="edgeStyle=entityRelationEdgeStyle;fontSize=12;html=1;endArrow=ERzeroToMany;startArrow=ERzeroToOne;rounded=0;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" parent="1" source="03sitQUDjDdc8CLbrQEY-131" target="03sitQUDjDdc8CLbrQEY-101" edge="1">
<mxGeometry width="100" height="100" relative="1" as="geometry">
<mxPoint x="730" y="320" as="sourcePoint" />
<mxPoint x="810" y="350" as="targetPoint" />
<mxPoint x="980" y="600" as="sourcePoint" />
<mxPoint x="1060" y="630" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="03sitQUDjDdc8CLbrQEY-147" value="" style="edgeStyle=entityRelationEdgeStyle;fontSize=12;html=1;endArrow=ERzeroToMany;startArrow=ERmandOne;rounded=0;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="03sitQUDjDdc8CLbrQEY-23" target="03sitQUDjDdc8CLbrQEY-137">
<mxCell id="03sitQUDjDdc8CLbrQEY-147" value="" style="edgeStyle=entityRelationEdgeStyle;fontSize=12;html=1;endArrow=ERzeroToMany;startArrow=ERmandOne;rounded=0;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" parent="1" source="03sitQUDjDdc8CLbrQEY-23" target="03sitQUDjDdc8CLbrQEY-137" edge="1">
<mxGeometry width="100" height="100" relative="1" as="geometry">
<mxPoint x="710" y="420" as="sourcePoint" />
<mxPoint x="830" y="500" as="targetPoint" />
<mxPoint x="960" y="700" as="sourcePoint" />
<mxPoint x="1080" y="780" as="targetPoint" />
<Array as="points">
<mxPoint x="750" y="420" />
<mxPoint x="810" y="450" />
<mxPoint x="760" y="420" />
<mxPoint x="740" y="510" />
<mxPoint x="700" y="440" />
<mxPoint x="1000" y="700" />
<mxPoint x="1060" y="730" />
<mxPoint x="1010" y="700" />
<mxPoint x="990" y="790" />
<mxPoint x="950" y="720" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="03sitQUDjDdc8CLbrQEY-148" value="Images" style="shape=table;startSize=30;container=1;collapsible=1;childLayout=tableLayout;fixedRows=1;rowLines=0;fontStyle=1;align=center;resizeLast=1;html=1;" vertex="1" parent="1">
<mxGeometry x="750" y="40" width="180" height="90" as="geometry" />
<mxCell id="03sitQUDjDdc8CLbrQEY-148" value="Images" style="shape=table;startSize=30;container=1;collapsible=1;childLayout=tableLayout;fixedRows=1;rowLines=0;fontStyle=1;align=center;resizeLast=1;html=1;rounded=0;" parent="1" vertex="1">
<mxGeometry x="1000" y="300" width="180" height="90" as="geometry" />
</mxCell>
<mxCell id="03sitQUDjDdc8CLbrQEY-149" value="" style="shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom=1;" vertex="1" parent="03sitQUDjDdc8CLbrQEY-148">
<mxCell id="03sitQUDjDdc8CLbrQEY-149" value="" style="shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom=1;rounded=0;" parent="03sitQUDjDdc8CLbrQEY-148" vertex="1">
<mxGeometry y="30" width="180" height="30" as="geometry" />
</mxCell>
<mxCell id="03sitQUDjDdc8CLbrQEY-150" value="PK" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;fontStyle=1;overflow=hidden;whiteSpace=wrap;html=1;" vertex="1" parent="03sitQUDjDdc8CLbrQEY-149">
<mxCell id="03sitQUDjDdc8CLbrQEY-150" value="PK" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;fontStyle=1;overflow=hidden;whiteSpace=wrap;html=1;rounded=0;" parent="03sitQUDjDdc8CLbrQEY-149" vertex="1">
<mxGeometry width="30" height="30" as="geometry">
<mxRectangle width="30" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="03sitQUDjDdc8CLbrQEY-151" value="ImageID" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;fontStyle=5;overflow=hidden;whiteSpace=wrap;html=1;" vertex="1" parent="03sitQUDjDdc8CLbrQEY-149">
<mxCell id="03sitQUDjDdc8CLbrQEY-151" value="ImageID" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;fontStyle=5;overflow=hidden;whiteSpace=wrap;html=1;rounded=0;" parent="03sitQUDjDdc8CLbrQEY-149" vertex="1">
<mxGeometry x="30" width="150" height="30" as="geometry">
<mxRectangle width="150" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="03sitQUDjDdc8CLbrQEY-152" value="" style="shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom=0;" vertex="1" parent="03sitQUDjDdc8CLbrQEY-148">
<mxCell id="03sitQUDjDdc8CLbrQEY-152" value="" style="shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom=0;rounded=0;" parent="03sitQUDjDdc8CLbrQEY-148" vertex="1">
<mxGeometry y="60" width="180" height="30" as="geometry" />
</mxCell>
<mxCell id="03sitQUDjDdc8CLbrQEY-153" value="" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;editable=1;overflow=hidden;whiteSpace=wrap;html=1;" vertex="1" parent="03sitQUDjDdc8CLbrQEY-152">
<mxCell id="03sitQUDjDdc8CLbrQEY-153" value="" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;editable=1;overflow=hidden;whiteSpace=wrap;html=1;rounded=0;" parent="03sitQUDjDdc8CLbrQEY-152" vertex="1">
<mxGeometry width="30" height="30" as="geometry">
<mxRectangle width="30" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="03sitQUDjDdc8CLbrQEY-154" value="Url" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;whiteSpace=wrap;html=1;" vertex="1" parent="03sitQUDjDdc8CLbrQEY-152">
<mxCell id="03sitQUDjDdc8CLbrQEY-154" value="Url" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;whiteSpace=wrap;html=1;rounded=0;" parent="03sitQUDjDdc8CLbrQEY-152" vertex="1">
<mxGeometry x="30" width="150" height="30" as="geometry">
<mxRectangle width="150" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="03sitQUDjDdc8CLbrQEY-164" value="" style="edgeStyle=entityRelationEdgeStyle;fontSize=12;html=1;endArrow=ERzeroToOne;startArrow=ERmandOne;rounded=0;exitX=1;exitY=0.5;exitDx=0;exitDy=0;" edge="1" parent="1" source="03sitQUDjDdc8CLbrQEY-161" target="03sitQUDjDdc8CLbrQEY-149">
<mxCell id="ywnix-sB55ZwvuEVbHo9-12" value="MealImages" style="shape=table;startSize=30;container=1;collapsible=1;childLayout=tableLayout;fixedRows=1;rowLines=0;fontStyle=1;align=center;resizeLast=1;html=1;rounded=0;" vertex="1" parent="1">
<mxGeometry x="1250" y="450" width="180" height="90" as="geometry" />
</mxCell>
<mxCell id="ywnix-sB55ZwvuEVbHo9-13" value="" style="shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom=1;rounded=0;" vertex="1" parent="ywnix-sB55ZwvuEVbHo9-12">
<mxGeometry y="30" width="180" height="30" as="geometry" />
</mxCell>
<mxCell id="ywnix-sB55ZwvuEVbHo9-14" value="PK" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;fontStyle=1;overflow=hidden;whiteSpace=wrap;html=1;rounded=0;" vertex="1" parent="ywnix-sB55ZwvuEVbHo9-13">
<mxGeometry width="30" height="30" as="geometry">
<mxRectangle width="30" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="ywnix-sB55ZwvuEVbHo9-15" value="ImageID" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;fontStyle=5;overflow=hidden;whiteSpace=wrap;html=1;rounded=0;" vertex="1" parent="ywnix-sB55ZwvuEVbHo9-13">
<mxGeometry x="30" width="150" height="30" as="geometry">
<mxRectangle width="150" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="ywnix-sB55ZwvuEVbHo9-16" value="" style="shape=tableRow;horizontal=0;startSize=0;swimlaneHead=0;swimlaneBody=0;fillColor=none;collapsible=0;dropTarget=0;points=[[0,0.5],[1,0.5]];portConstraint=eastwest;top=0;left=0;right=0;bottom=0;rounded=0;" vertex="1" parent="ywnix-sB55ZwvuEVbHo9-12">
<mxGeometry y="60" width="180" height="30" as="geometry" />
</mxCell>
<mxCell id="ywnix-sB55ZwvuEVbHo9-17" value="&lt;b&gt;PK&lt;/b&gt;" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;editable=1;overflow=hidden;whiteSpace=wrap;html=1;rounded=0;" vertex="1" parent="ywnix-sB55ZwvuEVbHo9-16">
<mxGeometry width="30" height="30" as="geometry">
<mxRectangle width="30" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="ywnix-sB55ZwvuEVbHo9-18" value="&lt;u&gt;&lt;b&gt;MealID&lt;/b&gt;&lt;/u&gt;" style="shape=partialRectangle;connectable=0;fillColor=none;top=0;left=0;bottom=0;right=0;align=left;spacingLeft=6;overflow=hidden;whiteSpace=wrap;html=1;rounded=0;" vertex="1" parent="ywnix-sB55ZwvuEVbHo9-16">
<mxGeometry x="30" width="150" height="30" as="geometry">
<mxRectangle width="150" height="30" as="alternateBounds" />
</mxGeometry>
</mxCell>
<mxCell id="ywnix-sB55ZwvuEVbHo9-22" value="" style="edgeStyle=entityRelationEdgeStyle;fontSize=12;html=1;endArrow=ERmandOne;startArrow=ERmandOne;rounded=0;entryX=1;entryY=0.5;entryDx=0;entryDy=0;exitX=0;exitY=0.5;exitDx=0;exitDy=0;" edge="1" parent="1" source="ywnix-sB55ZwvuEVbHo9-13" target="03sitQUDjDdc8CLbrQEY-149">
<mxGeometry width="100" height="100" relative="1" as="geometry">
<mxPoint x="980" y="210" as="sourcePoint" />
<mxPoint x="1050" y="130" as="targetPoint" />
<mxPoint x="1440" y="500" as="sourcePoint" />
<mxPoint x="1575" y="390" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="ywnix-sB55ZwvuEVbHo9-33" value="" style="edgeStyle=entityRelationEdgeStyle;fontSize=12;html=1;endArrow=ERzeroToMany;startArrow=ERmandOne;rounded=0;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="03sitQUDjDdc8CLbrQEY-98" target="ywnix-sB55ZwvuEVbHo9-16">
<mxGeometry width="100" height="100" relative="1" as="geometry">
<mxPoint x="1260" y="665" as="sourcePoint" />
<mxPoint x="1330" y="565" as="targetPoint" />
<Array as="points">
<mxPoint x="980" y="140" />
<mxPoint x="1580" y="710" />
<mxPoint x="1640" y="740" />
<mxPoint x="1590" y="710" />
<mxPoint x="1570" y="800" />
<mxPoint x="1530" y="730" />
</Array>
</mxGeometry>
</mxCell>
<mxCell id="ywnix-sB55ZwvuEVbHo9-42" value="" style="edgeStyle=entityRelationEdgeStyle;fontSize=12;html=1;endArrow=ERzeroToOne;startArrow=ERmandOne;rounded=0;exitX=1;exitY=0.5;exitDx=0;exitDy=0;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="ywnix-sB55ZwvuEVbHo9-39" target="03sitQUDjDdc8CLbrQEY-149">
<mxGeometry width="100" height="100" relative="1" as="geometry">
<mxPoint x="820" y="860" as="sourcePoint" />
<mxPoint x="920" y="760" as="targetPoint" />
</mxGeometry>
</mxCell>
</root>
</mxGraphModel>
</diagram>

View file

@ -0,0 +1,6 @@
-- This file was automatically created by Diesel to setup helper functions
-- and other internal bookkeeping. This file is safe to edit, any future
-- changes will be added to existing projects as new migrations.
DROP FUNCTION IF EXISTS diesel_manage_updated_at(_tbl regclass);
DROP FUNCTION IF EXISTS diesel_set_updated_at();

View file

@ -0,0 +1,36 @@
-- This file was automatically created by Diesel to setup helper functions
-- and other internal bookkeeping. This file is safe to edit, any future
-- changes will be added to existing projects as new migrations.
-- Sets up a trigger for the given table to automatically set a column called
-- `updated_at` whenever the row is modified (unless `updated_at` was included
-- in the modified columns)
--
-- # Example
--
-- ```sql
-- CREATE TABLE users (id SERIAL PRIMARY KEY, updated_at TIMESTAMP NOT NULL DEFAULT NOW());
--
-- SELECT diesel_manage_updated_at('users');
-- ```
CREATE OR REPLACE FUNCTION diesel_manage_updated_at(_tbl regclass) RETURNS VOID AS $$
BEGIN
EXECUTE format('CREATE TRIGGER set_updated_at BEFORE UPDATE ON %s
FOR EACH ROW EXECUTE PROCEDURE diesel_set_updated_at()', _tbl);
END;
$$ LANGUAGE plpgsql;
CREATE OR REPLACE FUNCTION diesel_set_updated_at() RETURNS trigger AS $$
BEGIN
IF (
NEW IS DISTINCT FROM OLD AND
NEW.updated_at IS NOT DISTINCT FROM OLD.updated_at
) THEN
NEW.updated_at := current_timestamp;
END IF;
RETURN NEW;
END;
$$ LANGUAGE plpgsql;

View file

@ -0,0 +1,13 @@
ALTER TABLE meal_images DROP CONSTRAINT image_id_constraint;
ALTER TABLE meal_images DROP CONSTRAINT meal_id_constraint;
DROP TABLE meals;
DROP TABLE restaurant_ratings;
DROP TABLE restaurants;
DROP TABLE nodes;
DROP TABLE users;
DROP TABLE images;
DROP TABLE meal_images;
DROP TYPE node_type;
DROP EXTENSION postgis CASCADE;

View file

@ -0,0 +1,58 @@
CREATE TYPE node_type AS ENUM ('marker', 'restaurant');
CREATE EXTENSION postgis;
CREATE TABLE nodes(
id SERIAL PRIMARY KEY,
name VARCHAR(100) NOT NULL,
type NODE_TYPE NOT NULL,
coordinates GEOMETRY(POINT,4326) NOT NULL
);
CREATE TABLE restaurants(
id SERIAL PRIMARY KEY,
node_id INTEGER REFERENCES nodes(id) NOT NULL,
address VARCHAR(30) NOT NULL,
price INTEGER CHECK ( price >= 0 AND price <= 10 ) NOT NULL
);
CREATE TABLE images(
id SERIAL PRIMARY KEY,
url VARCHAR(50) NOT NULL
);
CREATE TABLE users(
id SERIAL PRIMARY KEY,
name VARCHAR(20) NOT NULL,
uuid UUID NOT NULL,
avatar_id INTEGER REFERENCES images(id),
UNIQUE(uuid)
);
CREATE TABLE restaurant_ratings(
id SERIAL PRIMARY KEY,
restaurant_id INTEGER REFERENCES restaurants(id) NOT NULL,
user_id INTEGER REFERENCES users(id) NOT NULL,
note VARCHAR(100) NOT NULL DEFAULT ''
);
CREATE TABLE meals(
id SERIAL PRIMARY KEY,
restaurant_rating_id INTEGER REFERENCES restaurant_ratings(id) NOT NULL,
user_id INTEGER REFERENCES users(id) NOT NULL,
name VARCHAR(30) NOT NULL,
rating INTEGER CHECK ( rating >= 0 AND rating <= 10 ) NOT NULL,
price DECIMAL(12,2) CHECK (price >= 0) NOT NULL,
price_currency VARCHAR(1) CHECK (TRIM(price_currency) <> '') NOT NULL,
note VARCHAR(100) NOT NULL DEFAULT '',
date DATE NOT NULL
);
CREATE TABLE meal_images(
image_id INTEGER NOT NULL,
meal_id INTEGER NOT NULL,
CONSTRAINT image_id_constraint FOREIGN KEY (image_id) REFERENCES images(id),
CONSTRAINT meal_id_constraint FOREIGN KEY (meal_id) REFERENCES meals(id),
PRIMARY KEY(image_id,meal_id)
);

16
patches/schema.patch Normal file
View file

@ -0,0 +1,16 @@
--- src/full_schema.rs 2024-05-10 11:34:46.376360145 +0200
+++ src/schema.rs 2024-05-10 11:34:24.009031704 +0200
@@ -52,13 +52,12 @@
}
diesel::table! {
use diesel::sql_types::*;
use postgis_diesel::sql_types::*;
use super::sql_types::NodeType;
- use super::sql_types::Geometry;
nodes (id) {
id -> Int4,
#[max_length = 100]
name -> Varchar,
#[sql_name = "type"]

12
src/db.rs Normal file
View file

@ -0,0 +1,12 @@
use diesel::pg::PgConnection;
use diesel::prelude::*;
use dotenvy::dotenv;
use std::env;
pub fn establish_connection() -> PgConnection {
dotenv().ok();
let database_url = env::var("DATABASE_URL").expect("DATABASE_URL must be set");
PgConnection::establish(&database_url)
.unwrap_or_else(|_| panic!("Error connecting to {}", database_url))
}

9
src/main.rs Normal file
View file

@ -0,0 +1,9 @@
#[macro_use]
extern crate diesel;
mod db;
mod models;
mod schema;
use diesel::prelude::*;
fn main() {}

18
src/models.rs Normal file
View file

@ -0,0 +1,18 @@
use crate::schema::nodes;
use diesel::prelude::*;
use postgis_diesel::types::Point;
#[derive(diesel_derive_enum::DbEnum, Debug)]
#[ExistingTypePath = "crate::schema::sql_types::NodeType"]
pub enum NodeType {
Marker,
Restaurant,
}
#[derive(Insertable)]
#[diesel(table_name = nodes)]
pub struct NewNode<'a> {
pub name: &'a str,
pub type_: NodeType,
pub coordinates: Point,
}

142
src/schema.rs Normal file
View file

@ -0,0 +1,142 @@
// @generated automatically by Diesel CLI.
pub mod sql_types {
#[derive(diesel::query_builder::QueryId, diesel::sql_types::SqlType)]
#[diesel(postgres_type(name = "geometry"))]
pub struct Geometry;
#[derive(diesel::query_builder::QueryId, diesel::sql_types::SqlType)]
#[diesel(postgres_type(name = "node_type"))]
pub struct NodeType;
}
diesel::table! {
use diesel::sql_types::*;
use postgis_diesel::sql_types::*;
images (id) {
id -> Int4,
#[max_length = 50]
url -> Varchar,
}
}
diesel::table! {
use diesel::sql_types::*;
use postgis_diesel::sql_types::*;
meal_images (image_id, meal_id) {
image_id -> Int4,
meal_id -> Int4,
}
}
diesel::table! {
use diesel::sql_types::*;
use postgis_diesel::sql_types::*;
meals (id) {
id -> Int4,
restaurant_rating_id -> Int4,
user_id -> Int4,
#[max_length = 30]
name -> Varchar,
rating -> Int4,
price -> Numeric,
#[max_length = 1]
price_currency -> Varchar,
#[max_length = 100]
note -> Varchar,
date -> Date,
}
}
diesel::table! {
use diesel::sql_types::*;
use postgis_diesel::sql_types::*;
use super::sql_types::NodeType;
nodes (id) {
id -> Int4,
#[max_length = 100]
name -> Varchar,
#[sql_name = "type"]
type_ -> NodeType,
coordinates -> Geometry,
}
}
diesel::table! {
use diesel::sql_types::*;
use postgis_diesel::sql_types::*;
restaurant_ratings (id) {
id -> Int4,
restaurant_id -> Int4,
user_id -> Int4,
#[max_length = 100]
note -> Varchar,
}
}
diesel::table! {
use diesel::sql_types::*;
use postgis_diesel::sql_types::*;
restaurants (id) {
id -> Int4,
node_id -> Int4,
#[max_length = 30]
address -> Varchar,
price -> Int4,
}
}
diesel::table! {
use diesel::sql_types::*;
use postgis_diesel::sql_types::*;
spatial_ref_sys (srid) {
srid -> Int4,
#[max_length = 256]
auth_name -> Nullable<Varchar>,
auth_srid -> Nullable<Int4>,
#[max_length = 2048]
srtext -> Nullable<Varchar>,
#[max_length = 2048]
proj4text -> Nullable<Varchar>,
}
}
diesel::table! {
use diesel::sql_types::*;
use postgis_diesel::sql_types::*;
users (id) {
id -> Int4,
#[max_length = 20]
name -> Varchar,
uuid -> Uuid,
avatar_id -> Nullable<Int4>,
}
}
diesel::joinable!(meal_images -> images (image_id));
diesel::joinable!(meal_images -> meals (meal_id));
diesel::joinable!(meals -> restaurant_ratings (restaurant_rating_id));
diesel::joinable!(meals -> users (user_id));
diesel::joinable!(restaurant_ratings -> restaurants (restaurant_id));
diesel::joinable!(restaurant_ratings -> users (user_id));
diesel::joinable!(restaurants -> nodes (node_id));
diesel::joinable!(users -> images (avatar_id));
diesel::allow_tables_to_appear_in_same_query!(
images,
meal_images,
meals,
nodes,
restaurant_ratings,
restaurants,
spatial_ref_sys,
users,
);