mirror of
https://github.com/aaronpo97/the-biergarten-app.git
synced 2026-10-14 17:54:42 +00:00
42 lines
1.1 KiB
Plaintext
42 lines
1.1 KiB
Plaintext
---
|
|
config:
|
|
layout: elk
|
|
---
|
|
|
|
|
|
erDiagram
|
|
Brewery ||--o| BreweryLocation : "has location"
|
|
Brewery ||--o{ BreweryPhoto : "has photos"
|
|
Brewery ||--o{ Beer : "brews"
|
|
|
|
%% Cross-schema: defined in full in auth.mmd / geolocation.mmd / media.mmd / beer.mmd
|
|
User ||--o{ Brewery : "posts"
|
|
BreweryLocation }o--|| City : "located in"
|
|
BreweryPhoto }o--|| Photo : "uses photo"
|
|
|
|
Brewery {
|
|
uniqueidentifier BreweryPostID PK
|
|
nvarchar BreweryName
|
|
uniqueidentifier PostedByID FK
|
|
nvarchar Description
|
|
datetime CreatedAt
|
|
datetime UpdatedAt "nullable"
|
|
}
|
|
|
|
BreweryLocation {
|
|
uniqueidentifier BreweryPostLocationID PK
|
|
uniqueidentifier BreweryPostID "FK, UK"
|
|
nvarchar AddressLine1
|
|
nvarchar AddressLine2 "nullable"
|
|
nvarchar PostalCode
|
|
uniqueidentifier CityID FK
|
|
geography Coordinates "nullable"
|
|
}
|
|
|
|
BreweryPhoto {
|
|
uniqueidentifier BreweryPostPhotoID PK
|
|
uniqueidentifier BreweryPostID FK
|
|
uniqueidentifier PhotoID FK
|
|
datetime LinkedAt
|
|
}
|