Add more locations, add all location images, adjust seatGroups in locations

This commit is contained in:
2024-10-08 20:04:56 +02:00
parent 41a7cbc9da
commit fe2cea5529
57 changed files with 606 additions and 381 deletions

View File

@@ -0,0 +1,576 @@
{
"data": [
{
"name": "Hannover",
"country": "Germany",
"locations": [
{
"id": 0,
"name": "Swiss Life Hall",
"address": "Ferdinand-Wilhelm-Fricke-Weg 8",
"imageIndoor": "locations/swiss-life-hall-indoor.jpg",
"imageOutdoor": "locations/swiss-life-hall-outdoor.jpg",
"seatGroups": [
{
"name": "A",
"surcharge": 20,
"standingArea": true,
"capacity": 40
},
{
"name": "B",
"surcharge": 10,
"standingArea": false,
"rows": 5,
"capacity": 25
},
{
"name": "C",
"surcharge": 10,
"standingArea": false,
"rows": 5,
"capacity": 25
},
{
"name": "D",
"surcharge": 10,
"standingArea": false,
"rows": 3,
"capacity": 30
},
{
"name": "E",
"surcharge": 10,
"standingArea": false,
"rows": 3,
"capacity": 12
},
{
"name": "F",
"surcharge": 10,
"standingArea": false,
"rows": 3,
"capacity": 12
}
]
},
{
"id": 1,
"name": "Capitol",
"address": "Schwarzer Bär 2",
"imageIndoor": "locations/capitol-indoor.jpg",
"imageOutdoor": "locations/capitol-outdoor.jpg",
"seatGroups": [
{
"name": "A",
"surcharge": 20,
"standingArea": true,
"capacity": 50
}
]
},
{
"id": 2,
"name": "ZAG Arena",
"address": "EXPO-Plaza 7",
"imageIndoor": "locations/zag-arena-indoor.jpg",
"imageOutdoor": "locations/zag-arena-outdoor.jpg",
"seatGroups": [
{
"name": "A",
"surcharge": 20,
"standingArea": true,
"capacity": 40
},
{
"name": "B",
"surcharge": 10,
"standingArea": false,
"rows": 5,
"capacity": 25
},
{
"name": "C",
"surcharge": 10,
"standingArea": false,
"rows": 5,
"capacity": 25
},
{
"name": "D",
"surcharge": 10,
"standingArea": false,
"rows": 3,
"capacity": 30
},
{
"name": "E",
"surcharge": 10,
"standingArea": false,
"rows": 3,
"capacity": 12
},
{
"name": "F",
"surcharge": 10,
"standingArea": false,
"rows": 3,
"capacity": 12
}
]
},
{
"id": 3,
"name": "Kulturzentrum Faust",
"address": "Zur Bettfedernfabrik 3",
"imageIndoor": "locations/faust-hannover-indoor.jpg",
"imageOutdoor": "locations/faust-hannover-outdoor.jpg",
"seatGroups": [
{
"name": "A",
"surcharge": 20,
"standingArea": true,
"capacity": 25
}
]
}
]
},
{
"name": "München",
"country": "Germany",
"locations": [
{
"id": 4,
"name": "Olympiahalle München",
"address": "Spiridon-Louis-Ring 21",
"imageIndoor": "locations/olympiahalle-munich-indoor.jpg",
"imageOutdoor": "locations/olympiahalle-munich-outdoor.jpg",
"seatGroups": [
{
"name": "A",
"surcharge": 20,
"standingArea": true,
"capacity": 60
},
{
"name": "B",
"surcharge": 10,
"standingArea": false,
"rows": 5,
"capacity": 20
},
{
"name": "C",
"surcharge": 10,
"standingArea": false,
"rows": 5,
"capacity": 20
},
{
"name": "D",
"surcharge": 10,
"standingArea": false,
"rows": 3,
"capacity": 20
},
{
"name": "E",
"surcharge": 10,
"standingArea": false,
"rows": 3,
"capacity": 12
},
{
"name": "F",
"surcharge": 10,
"standingArea": false,
"rows": 3,
"capacity": 12
}
]
},
{
"id": 5,
"name": "Schlachthof München",
"address": "Zenettistraße 9",
"imageIndoor": "locations/schlachthof-munich-indoor.jpg",
"imageOutdoor": "locations/schlachthof-munich-outdoor.jpg",
"seatGroups": [
{
"name": "A",
"surcharge": 20,
"standingArea": true,
"capacity": 40
}
]
},
{
"id": 6,
"name": "Muffatwerk",
"address": "Zellstraße 4",
"imageIndoor": "locations/muffatwerk-indoor.jpg",
"imageOutdoor": "locations/muffatwerk-outdoor.jpg",
"seatGroups": [
{
"name": "A",
"surcharge": 20,
"standingArea": true,
"capacity": 60
}
]
}
]
},
{
"name": "Hamburg",
"country": "Germany",
"locations": [
{
"id": 7,
"name": "Volksparkstadion",
"address": "Sylvesterallee 7",
"imageIndoor": "locations/volksparkstadion-hamburg-indoor.jpg",
"imageOutdoor": "locations/volksparkstadion-hamburg-outdoor.jpg",
"seatGroups": [
{
"name": "A",
"surcharge": 20,
"standingArea": true,
"capacity": 50
},
{
"name": "B",
"surcharge": 10,
"standingArea": false,
"rows": 5,
"capacity": 25
},
{
"name": "C",
"surcharge": 10,
"standingArea": false,
"rows": 5,
"capacity": 25
},
{
"name": "D",
"surcharge": 10,
"standingArea": false,
"rows": 3,
"capacity": 20
},
{
"name": "E",
"surcharge": 10,
"standingArea": false,
"rows": 3,
"capacity": 16
},
{
"name": "F",
"surcharge": 10,
"standingArea": false,
"rows": 3,
"capacity": 16
}
]
},
{
"id": 8,
"name": "Barclays Arena",
"address": "Sylvesterallee 10",
"imageIndoor": "locations/barclays-arena-indoor.jpg",
"imageOutdoor": "locations/barclays-arena-outdoor.jpg",
"seatGroups": [
{
"name": "A",
"surcharge": 20,
"standingArea": false,
"capacity": 40
},
{
"name": "B",
"surcharge": 10,
"standingArea": false,
"rows": 5,
"capacity": 25
},
{
"name": "C",
"surcharge": 10,
"standingArea": false,
"rows": 5,
"capacity": 25
}
]
}
]
},
{
"name": "Berlin",
"country": "Germany",
"locations": [
{
"id": 9,
"name": "Waldbühne Berlin",
"address": "Am Glockenturm",
"imageIndoor": "locations/waldbuehne-berlin-indoor.jpg",
"imageOutdoor": "locations/waldbuehne-berlin-outdoor.jpg",
"seatGroups": [
{
"name": "A",
"surcharge": 20,
"standingArea": false,
"capacity": 10
},
{
"name": "B",
"surcharge": 10,
"standingArea": false,
"rows": 5,
"capacity": 25
},
{
"name": "C",
"surcharge": 10,
"standingArea": false,
"rows": 5,
"capacity": 25
}
]
},
{
"id": 10,
"name": "Olympiastadion Berlin",
"address": "Olympischer Platz 3",
"imageIndoor": "locations/olympiastadion-berlin-indoor.jpg",
"imageOutdoor": "locations/olympiastadion-berlin-outdoor.jpg",
"seatGroups": [
{
"name": "A",
"surcharge": 20,
"standingArea": true,
"capacity": 60
},
{
"name": "B",
"surcharge": 10,
"standingArea": false,
"rows": 5,
"capacity": 20
},
{
"name": "C",
"surcharge": 10,
"standingArea": false,
"rows": 5,
"capacity": 20
},
{
"name": "D",
"surcharge": 10,
"standingArea": false,
"rows": 3,
"capacity": 20
},
{
"name": "E",
"surcharge": 10,
"standingArea": false,
"rows": 3,
"capacity": 12
},
{
"name": "F",
"surcharge": 10,
"standingArea": false,
"rows": 3,
"capacity": 12
}
]
},
{
"id": 11,
"name": "Uber Arena Berlin",
"address": "Uber-Platz 1",
"imageIndoor": "locations/uber-arena-berlin-indoor.jpg",
"imageOutdoor": "locations/uber-arena-berlin-outdoor.jpg",
"seatGroups": [
{
"name": "A",
"surcharge": 20,
"standingArea": true,
"capacity": 50
},
{
"name": "B",
"surcharge": 10,
"standingArea": false,
"rows": 5,
"capacity": 30
},
{
"name": "C",
"surcharge": 10,
"standingArea": false,
"rows": 5,
"capacity": 30
},
{
"name": "D",
"surcharge": 10,
"standingArea": false,
"rows": 3,
"capacity": 20
},
{
"name": "E",
"surcharge": 10,
"standingArea": false,
"rows": 3,
"capacity": 12
},
{
"name": "F",
"surcharge": 10,
"standingArea": false,
"rows": 3,
"capacity": 12
}
]
},
{
"id": 12,
"name": "Columbiahalle",
"address": "Columbiadamm 13-21",
"imageIndoor": "locations/columbiahalle-indoor.jpg",
"imageOutdoor": "locations/columbiahalle-outdoor.jpg",
"seatGroups": [
{
"name": "A",
"surcharge": 20,
"standingArea": true,
"capacity": 50
},
{
"name": "B",
"surcharge": 10,
"standingArea": false,
"rows": 5,
"capacity": 30
},
{
"name": "C",
"surcharge": 10,
"standingArea": false,
"rows": 5,
"capacity": 30
}
]
},
{
"id": 13,
"name": "Astra Kulturhaus",
"address": "Revaler Straße 99",
"imageIndoor": "locations/astra-kulturhaus-indoor.jpg",
"imageOutdoor": "locations/astra-kulturhaus-outdoor.jpg",
"seatGroups": [
{
"name": "A",
"surcharge": 0,
"standingArea": true,
"capacity": 40
}
]
}
]
},
{
"name": "Köln",
"country": "Germany",
"locations": [
{
"id": 14,
"name": "LANXESS arena",
"address": "Willy-Brandt-Platz",
"imageIndoor": "locations/lanxess-arena-indoor.jpg",
"imageOutdoor": "locations/lanxess-arena-outdoor.jpg",
"seatGroups": [
{
"name": "A",
"surcharge": 20,
"standingArea": true,
"capacity": 50
},
{
"name": "B",
"surcharge": 10,
"standingArea": false,
"rows": 5,
"capacity": 30
},
{
"name": "C",
"surcharge": 10,
"standingArea": false,
"rows": 5,
"capacity": 30
},
{
"name": "D",
"surcharge": 10,
"standingArea": false,
"rows": 3,
"capacity": 20
},
{
"name": "E",
"surcharge": 10,
"standingArea": false,
"rows": 3,
"capacity": 12
},
{
"name": "F",
"surcharge": 10,
"standingArea": false,
"rows": 3,
"capacity": 12
}
]
},
{
"id": 15,
"name": "Palladium",
"address": "Schanzenstraße 40",
"imageIndoor": "locations/palladium-indoor.jpg",
"imageOutdoor": "locations/palladium-outdoor.jpg",
"seatGroups": [
{
"name": "A",
"surcharge": 0,
"standingArea": true,
"capacity": 50
}
]
},
{
"id": 16,
"name": "E-Werk",
"address": "Schanzenstraße 37",
"imageIndoor": "locations/e-werk-indoor.jpg",
"imageOutdoor": "locations/e-werk-outdoor.jpg",
"seatGroups": [
{
"name": "A",
"surcharge": 0,
"standingArea": true,
"capacity": 40
}
]
}
]
}
]
}

View File

@@ -1,353 +0,0 @@
{
"data": [
{
"name": "Hannover",
"country": "Germany",
"locations": [
{
"id": 0,
"name": "Swiss Life Hall",
"address": "Ferdinand-Wilhelm-Fricke-Weg 8",
"image": "locations/swiss-life-hall.jpg",
"logo": "locations/capitol.logo.png",
"seatGroups": [
{
"name": "A",
"surcharge": 20,
"standingArea": true,
"capacity": 40
},
{
"name": "B",
"surcharge": 10,
"standingArea": false,
"rows": 5,
"capacity": 25
},
{
"name": "C",
"surcharge": 10,
"standingArea": false,
"rows": 5,
"capacity": 25
},
{
"name": "D",
"surcharge": 10,
"standingArea": false,
"rows": 3,
"capacity": 30
},
{
"name": "E",
"surcharge": 10,
"standingArea": false,
"rows": 3,
"capacity": 12
},
{
"name": "F",
"surcharge": 10,
"standingArea": false,
"rows": 3,
"capacity": 12
}
]
},
{
"id": 1,
"name": "Capitol",
"address": "Schwarzer Bär 2",
"image": "locations/capitol.jpg",
"logo": "locations/capitol-logo.png",
"seatGroups": [
{
"name": "A",
"surcharge": 20,
"standingArea": true,
"capacity": 50
}
]
},
{
"id": 2,
"name": "ZAG Arena",
"address": "EXPO-Plaza 7",
"image": "locations/zag-arena.jpg",
"logo": "locations/capitol.logo.png",
"seatGroups": [
{
"name": "A",
"surcharge": 20,
"standingArea": true,
"capacity": 40
},
{
"name": "B",
"surcharge": 10,
"standingArea": false,
"rows": 5,
"capacity": 25
},
{
"name": "C",
"surcharge": 10,
"standingArea": false,
"rows": 5,
"capacity": 25
},
{
"name": "D",
"surcharge": 10,
"standingArea": false,
"rows": 3,
"capacity": 30
},
{
"name": "E",
"surcharge": 10,
"standingArea": false,
"rows": 3,
"capacity": 12
},
{
"name": "F",
"surcharge": 10,
"standingArea": false,
"rows": 3,
"capacity": 12
}
]
},
{
"id": 3,
"name": "Kulturzentrum Faust",
"address": "Zur Bettfedernfabrik 3",
"image": "locations/faust-hannover.jpg",
"logo": "locations/faust-logo.png",
"seatGroups": [
{
"name": "A",
"surcharge": 20,
"standingArea": true,
"capacity": 10
}
]
}
]
},
{
"name": "München",
"country": "Germany",
"locations": [
{
"id": 4,
"name": "Olympiahalle München",
"address": "Spiridon-Louis-Ring 21",
"image": "locations/olympiahalle-munich.jpg",
"logo": "locations/capitol.logo.png",
"seatGroups": [
{
"name": "A",
"surcharge": 20,
"standingArea": true,
"capacity": 10
}
]
},
{
"id": 5,
"name": "Schlachthof München",
"address": "Zenettistraße 9",
"image": "locations/schlachthof-munich.jpg",
"logo": "locations/capitol.logo.png",
"seatGroups": [
{
"name": "A",
"surcharge": 20,
"standingArea": true,
"capacity": 10
}
]
},
{
"id": 6,
"name": "Muffatwerk",
"address": "Zellstraße 4",
"image": "locations/muffatwerk.jpg",
"logo": "locations/capitol.logo.png",
"seatGroups": [
{
"name": "A",
"surcharge": 20,
"standingArea": true,
"capacity": 10
}
]
}
]
},
{
"name": "Hamburg",
"country": "Germany",
"locations": [
{
"id": 7,
"name": "Elbphilharmonie Hamburg",
"address": "Platz der deutschen Einheit",
"image": "locations/elbphilharmonie-hamburg.jpg",
"logo": "locations/capitol.logo.png",
"seatGroups": [
{
"name": "A",
"surcharge": 20,
"standingArea": true,
"capacity": 10
}
]
},
{
"id": 8,
"name": "Volksparkstadion",
"address": "Sylvesterallee 7",
"image": "locations/volksparkstadion-hamburg.jpg",
"logo": "locations/capitol.logo.png",
"seatGroups": [
{
"name": "A",
"surcharge": 20,
"standingArea": true,
"capacity": 10
}
]
},
{
"id": 9,
"name": "Barclays Arena",
"address": "Sylvesterallee 10",
"image": "locations/barclays-arena.jpg",
"logo": "locations/capitol.logo.png",
"seatGroups": [
{
"name": "A",
"surcharge": 20,
"standingArea": true,
"capacity": 10
}
]
},
{
"id": 10,
"name": "Stage Theater im Hafen Hamburg",
"address": "Norderelbestraße 6",
"image": "locations/stage-theater-hamburg.jpg",
"logo": "locations/capitol.logo.png",
"seatGroups": [
{
"name": "A",
"surcharge": 20,
"standingArea": true,
"capacity": 10
}
]
}
]
},
{
"name": "Berlin",
"country": "Germany",
"locations": [
{
"id": 11,
"name": "Waldbühne Berlin",
"address": "Am Glockenturm",
"image": "locations/waldbuehne-berlin.jpg",
"logo": "locations/capitol.logo.png",
"seatGroups": [
{
"name": "A",
"surcharge": 20,
"standingArea": true,
"capacity": 10
}
]
},
{
"id": 12,
"name": "Olympiastadion Berlin",
"address": "Olympischer Platz 3",
"image": "locations/olympiastadion-berlin.jpg",
"logo": "locations/capitol.logo.png",
"seatGroups": [
{
"name": "A",
"surcharge": 20,
"standingArea": true,
"capacity": 10
}
]
},
{
"id": 13,
"name": "Uber Arena Berlin",
"address": "Uber-Platz 1",
"image": "locations/uber-arena-berlin.jpg",
"logo": "locations/capitol.logo.png",
"seatGroups": [
{
"name": "A",
"surcharge": 20,
"standingArea": true,
"capacity": 10
}
]
},
{
"id": 14,
"name": "Columbiahalle",
"address": "Columbiadamm 13-21",
"image": "locations/columbiahalle.jpg",
"logo": "locations/capitol.logo.png",
"seatGroups": [
{
"name": "A",
"surcharge": 20,
"standingArea": true,
"capacity": 10
}
]
},
{
"id": 15,
"name": "Astra Kulturhaus",
"address": "Revaler Straße 99",
"image": "locations/astra-kulturhaus.jpg",
"logo": "locations/capitol.logo.png",
"seatGroups": [
{
"name": "A",
"surcharge": 20,
"standingArea": true,
"capacity": 10
}
]
},
{
"id": 16,
"name": "Deutsche Oper Berlin",
"address": "Bismarckstraße 35",
"image": "locations/deutsche-oper-berlin.jpg",
"logo": "locations/capitol-logo.png",
"seatGroups": [
{
"name": "A",
"surcharge": 20,
"standingArea": true,
"capacity": 10
}
]
}
]
}
]
}

View File

Before

Width:  |  Height:  |  Size: 128 KiB

After

Width:  |  Height:  |  Size: 128 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 447 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 480 KiB

View File

Before

Width:  |  Height:  |  Size: 383 KiB

After

Width:  |  Height:  |  Size: 383 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 646 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

View File

Before

Width:  |  Height:  |  Size: 648 KiB

After

Width:  |  Height:  |  Size: 648 KiB

View File

Before

Width:  |  Height:  |  Size: 624 KiB

After

Width:  |  Height:  |  Size: 624 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 255 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 233 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 386 KiB

View File

Before

Width:  |  Height:  |  Size: 350 KiB

After

Width:  |  Height:  |  Size: 350 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 739 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 677 KiB

View File

Before

Width:  |  Height:  |  Size: 329 KiB

After

Width:  |  Height:  |  Size: 329 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 153 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 316 KiB

View File

Before

Width:  |  Height:  |  Size: 951 KiB

After

Width:  |  Height:  |  Size: 951 KiB

View File

Before

Width:  |  Height:  |  Size: 600 KiB

After

Width:  |  Height:  |  Size: 600 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 281 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 423 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 258 KiB

View File

Before

Width:  |  Height:  |  Size: 188 KiB

After

Width:  |  Height:  |  Size: 188 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 370 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 94 KiB

View File

Before

Width:  |  Height:  |  Size: 197 KiB

After

Width:  |  Height:  |  Size: 197 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 126 KiB

View File

Before

Width:  |  Height:  |  Size: 179 KiB

After

Width:  |  Height:  |  Size: 179 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 350 KiB

View File

Before

Width:  |  Height:  |  Size: 423 KiB

After

Width:  |  Height:  |  Size: 423 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 989 KiB

View File

Before

Width:  |  Height:  |  Size: 321 KiB

After

Width:  |  Height:  |  Size: 321 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 MiB

View File

Before

Width:  |  Height:  |  Size: 201 KiB

After

Width:  |  Height:  |  Size: 201 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB

View File

@@ -5,6 +5,9 @@ import { SeatGroup } from "./seatGroup.model";
@Table({ timestamps: false })
export class Location extends Model {
@Column
urlName: string
@Column
name: String
@@ -16,10 +19,10 @@ export class Location extends Model {
cityId: Number
@Column
image: String
imageIndoor: String
@Column
logo: String
imageOutdoor: String
// Relations

View File

@@ -23,7 +23,6 @@ exercises.get("/", (req: Request, res: Response) => {
})
exercises.post("/:groupNr/:exerciseNr/:state", (req: Request, res: Response) => {
console.log(req.params.groupNr)
ExerciseGroup.findOne({
where: { groupNr: req.params.groupNr }
})

View File

@@ -70,9 +70,9 @@ location.get("/", (req: Request, res: Response) => {
})
})
location.get("/:name", (req: Request, res: Response) => {
location.get("/:urlName", (req: Request, res: Response) => {
Location.findOne({
where: { name: { [Op.like]: req.params.name } },
where: { urlName: req.params.urlName },
include: [
City,
{

View File

@@ -25,7 +25,7 @@ import accountRoles from "./../data/accountRoles.json"
import bands from "./../data/bands.json"
import genres from "./../data/genres.json"
import events from "./../data/events.json"
import cities from "./../data/cities.json"
import citiesLocations from "./../data/cities-locations.json"
import exercises from "./../data/exercises.json"
@@ -82,13 +82,14 @@ export async function prepopulateDatabase() {
AccountRole.bulkCreate(accountRoles.data)
Genre.bulkCreate(genres.data)
for (let city of cities.data)
for (let city of citiesLocations.data)
{
await City.create(city)
.then(async cityDataset => {
for (let location of city.locations)
{
location["cityId"] = cityDataset.id
location["urlName"] = location.name.replaceAll(" ", "-").toLowerCase()
await Location.create(location)
.then(async locationDataset => {

View File

@@ -30,9 +30,9 @@ const path = require('path')
app.use('/static', express.static(path.join(__dirname, 'images')))
// Add delay for more realistic response times
app.use((req, res, next) => {
setTimeout(next, Math.floor((Math.random () * 2000) + 100))
})
// app.use((req, res, next) => {
// setTimeout(next, Math.floor((Math.random () * 2000) + 100))
// })
// Routes
app.use("/api", api)