Remove EventTable in database, redesign frontend URL paths
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
{
|
||||
"data": [
|
||||
{
|
||||
"id": 0,
|
||||
"username": "hagemeister93",
|
||||
"password": "Xjt3qb5t",
|
||||
"email": "hagemeister93@gmail.com",
|
||||
@@ -28,7 +27,6 @@
|
||||
"accountRoleId": 2
|
||||
},
|
||||
{
|
||||
"id": 1,
|
||||
"username": "katjaStoiber",
|
||||
"password": "target123",
|
||||
"email": "k.stoiber@uni-hannover.de",
|
||||
@@ -55,7 +53,6 @@
|
||||
"accountRoleId": 1
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"username": "oetkerohnek",
|
||||
"password": "iloveyou",
|
||||
"email": "oetker30625@gmx.com",
|
||||
@@ -63,16 +60,12 @@
|
||||
"lastName": "Oeter",
|
||||
"addresses": [
|
||||
{
|
||||
"id": 2,
|
||||
"accountId": 2,
|
||||
"street": "Eckermannstraße",
|
||||
"houseNumber": 1,
|
||||
"postalCode": 30625,
|
||||
"city": "Hannover"
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"accountId": 2,
|
||||
"street": "Gehrdener Straße",
|
||||
"houseNumber": 14,
|
||||
"postalCode": 30459,
|
||||
@@ -81,8 +74,6 @@
|
||||
],
|
||||
"payments": [
|
||||
{
|
||||
"id": 2,
|
||||
"accountId": 2,
|
||||
"bankName": "Commerzbank",
|
||||
"iban": "DE31500105175417833272"
|
||||
}
|
||||
@@ -90,7 +81,6 @@
|
||||
"accountRoleId": 1
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"username": "duranduran",
|
||||
"password": "H4nn0ver",
|
||||
"email": "dduran@hannover.de",
|
||||
@@ -98,16 +88,12 @@
|
||||
"lastName": "Durand",
|
||||
"addresses": [
|
||||
{
|
||||
"id": 4,
|
||||
"accountId": 3,
|
||||
"street": "Schlägerstraße",
|
||||
"houseNumber": 36,
|
||||
"postalCode": 30171,
|
||||
"city": "Hannover"
|
||||
},
|
||||
{
|
||||
"id": 5,
|
||||
"accountId": 3,
|
||||
"street": "Else-Ury-Weg",
|
||||
"houseNumber": 20,
|
||||
"postalCode": 30629,
|
||||
@@ -116,8 +102,6 @@
|
||||
],
|
||||
"payments": [
|
||||
{
|
||||
"id": 3,
|
||||
"accountId": 3,
|
||||
"bankName": "ING",
|
||||
"iban": "DE41500105172184936679"
|
||||
}
|
||||
@@ -125,7 +109,6 @@
|
||||
"accountRoleId": 2
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"username": "guitarhero",
|
||||
"password": "gwerty123",
|
||||
"email": "guitarheroFurti@gmail.com",
|
||||
@@ -133,8 +116,6 @@
|
||||
"lastName": "Furtwängler",
|
||||
"addresses": [
|
||||
{
|
||||
"id": 6,
|
||||
"accountId": 4,
|
||||
"street": "Steinmetzstraße",
|
||||
"houseNumber": 12,
|
||||
"postalCode": 30163,
|
||||
@@ -143,8 +124,6 @@
|
||||
],
|
||||
"payments": [
|
||||
{
|
||||
"id": 4,
|
||||
"accountId": 4,
|
||||
"bankName": "Sparkasse Hannover",
|
||||
"iban": "DE85500105172283979774"
|
||||
}
|
||||
@@ -152,7 +131,6 @@
|
||||
"accountRoleId": 1
|
||||
},
|
||||
{
|
||||
"id": 5,
|
||||
"username": "herbstMareike",
|
||||
"password": "qhsrbpgrs",
|
||||
"email": "m.herbst@uni-hannover.de",
|
||||
@@ -160,8 +138,6 @@
|
||||
"lastName": "Herbst",
|
||||
"addresses": [
|
||||
{
|
||||
"id": 7,
|
||||
"accountId": 5,
|
||||
"street": "Allerweg",
|
||||
"houseNumber": 33,
|
||||
"postalCode": 30851,
|
||||
@@ -170,8 +146,6 @@
|
||||
],
|
||||
"payments": [
|
||||
{
|
||||
"id": 5,
|
||||
"accountId": 5,
|
||||
"bankName": "Postbank",
|
||||
"iban": "DE45500105178862417577"
|
||||
}
|
||||
@@ -179,7 +153,6 @@
|
||||
"accountRoleId": 1
|
||||
},
|
||||
{
|
||||
"id": 6,
|
||||
"username": "seibertmitb",
|
||||
"password": "{jkz+WvQe",
|
||||
"email": "janna-seibert@yahoo.com",
|
||||
@@ -187,16 +160,12 @@
|
||||
"lastName": "Seibert",
|
||||
"addresses": [
|
||||
{
|
||||
"id": 8,
|
||||
"accountId": 6,
|
||||
"street": "Marktstraße",
|
||||
"houseNumber": 26,
|
||||
"postalCode": 30880,
|
||||
"city": "Laatzen"
|
||||
},
|
||||
{
|
||||
"id": 9,
|
||||
"accountId": 6,
|
||||
"street": "Kleiner Hillen",
|
||||
"houseNumber": 24,
|
||||
"postalCode": 30559,
|
||||
@@ -205,8 +174,6 @@
|
||||
],
|
||||
"payments": [
|
||||
{
|
||||
"id": 6,
|
||||
"accountId": 6,
|
||||
"bankName": "Sparkasse Hannover",
|
||||
"iban": "DE51500105177526222196"
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
{
|
||||
"data": [
|
||||
"bands": [
|
||||
{
|
||||
"id": 0,
|
||||
"name": "Red Hot Chili Peppers",
|
||||
"foundingYear": 1983,
|
||||
"descriptionEn": "The Red Hot Chili Peppers are an American rock band formed in Los Angeles in 1983, comprising vocalist Anthony Kiedis, bassist Flea, drummer Chad Smith, and guitarist John Frusciante. Their music incorporates elements of alternative rock, funk, punk rock, hard rock, hip hop, and psychedelic rock. Their eclectic range has influenced genres such as funk metal, rap metal, rap rock, and nu metal. With over 120 million records sold worldwide, the Red Hot Chili Peppers are one of the top-selling bands of all time.",
|
||||
@@ -14,73 +13,99 @@
|
||||
],
|
||||
"imageMembers": "bands/red-hot-chili-peppers-members.jpg",
|
||||
"logo": "bands/red-hot-chili-peppers-logo.png",
|
||||
"genreId": [
|
||||
0,
|
||||
2,
|
||||
3
|
||||
"genres": [
|
||||
"Funk Rock",
|
||||
"Alternative Rock",
|
||||
"Crossover"
|
||||
],
|
||||
"members": [
|
||||
{
|
||||
"name": "Anthony Kiedis",
|
||||
"bandId": 0,
|
||||
"image": "artists/anthony-kiedis.jpg"
|
||||
},
|
||||
{
|
||||
"name": "Flea",
|
||||
"bandId": 0,
|
||||
"image": "artists/flea.jpg"
|
||||
},
|
||||
{
|
||||
"name": "Chad Smith",
|
||||
"bandId": 0,
|
||||
"image": "artists/chad-smith.jpg"
|
||||
},
|
||||
{
|
||||
"name": "John Frusciante",
|
||||
"bandId": 0,
|
||||
"image": "artists/john-frusciante.jpg"
|
||||
}
|
||||
],
|
||||
"ratings": [
|
||||
{
|
||||
"accountId": 0,
|
||||
"rating": 5,
|
||||
"bandId": 0
|
||||
"username": "hagemeister93",
|
||||
"rating": 5
|
||||
},
|
||||
{
|
||||
"accountId": 1,
|
||||
"rating": 5,
|
||||
"bandId": 0
|
||||
"username": "katjaStoiber",
|
||||
"rating": 5
|
||||
},
|
||||
{
|
||||
"accountId": 2,
|
||||
"rating": 4,
|
||||
"bandId": 0
|
||||
"username": "oetkerohnek",
|
||||
"rating": 4
|
||||
},
|
||||
{
|
||||
"accountId": 3,
|
||||
"rating": 3,
|
||||
"bandId": 0
|
||||
"username": "duranduran",
|
||||
"rating": 3
|
||||
},
|
||||
{
|
||||
"accountId": 4,
|
||||
"rating": 5,
|
||||
"bandId": 0
|
||||
"username": "guitarhero",
|
||||
"rating": 5
|
||||
},
|
||||
{
|
||||
"accountId": 5,
|
||||
"rating": 4,
|
||||
"bandId": 0
|
||||
"username": "herbstMareike",
|
||||
"rating": 4
|
||||
},
|
||||
{
|
||||
"accountId": 6,
|
||||
"rating": 5,
|
||||
"bandId": 0
|
||||
"username": "seibertmitb",
|
||||
"rating": 5
|
||||
}
|
||||
],
|
||||
"concertGroups": [
|
||||
{
|
||||
"name": "Unlimited Love",
|
||||
"image": "events/unlimited-love-tour.jpg",
|
||||
"concerts": [
|
||||
{
|
||||
"date": "2024-10-18",
|
||||
"price": 92,
|
||||
"inStock": 0,
|
||||
"location": "Swiss Life Hall"
|
||||
},
|
||||
{
|
||||
"date": "2024-10-19",
|
||||
"price": 92,
|
||||
"inStock": 170,
|
||||
"location": "Swiss Life Hall"
|
||||
},
|
||||
{
|
||||
"date": "2024-10-23",
|
||||
"price": 119.90,
|
||||
"inStock": 8736,
|
||||
"location": "Olympiahalle München"
|
||||
},
|
||||
{
|
||||
"date": "2024-10-26",
|
||||
"price": 114.90,
|
||||
"inStock": 2793,
|
||||
"location": "Barclays Arena"
|
||||
},
|
||||
{
|
||||
"date": "2024-11-02",
|
||||
"price": 124.90,
|
||||
"inStock": 3079,
|
||||
"location": "Uber Arena Berlin"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 1,
|
||||
"name": "Radiohead",
|
||||
"foundingYear": 1985,
|
||||
"descriptionEn": "Radiohead are an English rock band formed in Abingdon, Oxfordshire, in 1985. They comprise Thom Yorke (vocals, guitar, piano, keyboards); brothers Jonny Greenwood (guitar, keyboards, other instruments) and Colin Greenwood (bass); Ed O'Brien (guitar, backing vocals); and Philip Selway (drums, percussion). They have worked with the producer Nigel Godrich and the cover artist Stanley Donwood since 1994. Radiohead's experimental approach is credited with advancing the sound of alternative rock.",
|
||||
@@ -92,55 +117,73 @@
|
||||
],
|
||||
"imageMembers": "bands/radiohead-members.jpg",
|
||||
"logo": "bands/radiohead-logo.jpg",
|
||||
"genreId": [
|
||||
1,
|
||||
2,
|
||||
4,
|
||||
5,
|
||||
6
|
||||
"genres": [
|
||||
"Art Rock",
|
||||
"Alternative Rock",
|
||||
"Electronica",
|
||||
"Post-Rock",
|
||||
"Britpop"
|
||||
],
|
||||
"members": [
|
||||
{
|
||||
"name": "Thom Yorke",
|
||||
"bandId": 1,
|
||||
"image": "artists/thom-yorke.jpg"
|
||||
},
|
||||
{
|
||||
"name": "Jonny Greenwood",
|
||||
"bandId": 1,
|
||||
"image": "artists/jonny-greenwood.jpg"
|
||||
},
|
||||
{
|
||||
"name": "Colin Greenwood",
|
||||
"bandId": 1,
|
||||
"image": "artists/colin-greenwood.jpg"
|
||||
},
|
||||
{
|
||||
"name": "Ed O'Brien",
|
||||
"bandId": 1,
|
||||
"image": "artists/ed-o-brien.jpg"
|
||||
},
|
||||
{
|
||||
"name": "Philip Selway",
|
||||
"bandId": 1,
|
||||
"image": "artists/philip-selway.jpg"
|
||||
}
|
||||
],
|
||||
"ratings": [
|
||||
{
|
||||
"accountId": 0,
|
||||
"rating": 5,
|
||||
"bandId": 1
|
||||
"username": "hagemeister93",
|
||||
"rating": 5
|
||||
},
|
||||
{
|
||||
"accountId": 1,
|
||||
"rating": 4,
|
||||
"bandId": 1
|
||||
"username": "katjaStoiber",
|
||||
"rating": 4
|
||||
}
|
||||
],
|
||||
"concertGroups": [
|
||||
{
|
||||
"name": "The Bends",
|
||||
"image": "events/the-bends-tour.jpg",
|
||||
"concerts": [
|
||||
{
|
||||
"date": "2024-11-30",
|
||||
"price": 108,
|
||||
"inStock": 1200,
|
||||
"location": "Capitol"
|
||||
},
|
||||
{
|
||||
"date": "2024-12-01",
|
||||
"price": 104,
|
||||
"inStock": 1800,
|
||||
"location": "Schlachthof München"
|
||||
},
|
||||
{
|
||||
"date": "2024-12-07",
|
||||
"price": 99.90,
|
||||
"inStock": 2438,
|
||||
"location": "Waldbühne Berlin"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"name": "Arctic Monkeys",
|
||||
"foundingYear": 2002,
|
||||
"descriptionEn": "Arctic Monkeys are an English rock band formed in Sheffield in 2002. The group consists of lead singer Alex Turner, drummer Matt Helders, guitarist Jamie Cook and bassist Nick O'Malley. Former bassist Andy Nicholson left the band in 2006 shortly after their debut album, Whatever People Say I Am, That's What I'm Not, was released.",
|
||||
@@ -152,58 +195,69 @@
|
||||
],
|
||||
"imageMembers": "bands/arctic-monkeys-members.jpg",
|
||||
"logo": "bands/arctic-monkeys-logo.png",
|
||||
"genreId": [
|
||||
2,
|
||||
7,
|
||||
8
|
||||
"genres": [
|
||||
"Alternative Rock",
|
||||
"Post-Punk",
|
||||
"Garage Rock"
|
||||
],
|
||||
"members": [
|
||||
{
|
||||
"name": "Glyn Jones",
|
||||
"bandId": 2,
|
||||
"image": "artists/glyn-jones.jpg"
|
||||
},
|
||||
{
|
||||
"name": "Alex Turner",
|
||||
"bandId": 2,
|
||||
"image": "artists/alex-turner.jpg"
|
||||
},
|
||||
{
|
||||
"name": "Jamie Cook",
|
||||
"bandId": 2,
|
||||
"image": "artists/jamie-cook.jpg"
|
||||
},
|
||||
{
|
||||
"name": "Matt Helders",
|
||||
"bandId": 2,
|
||||
"image": "artists/matt-helders.jpg"
|
||||
},
|
||||
{
|
||||
"name": "Andy Nicholson",
|
||||
"bandId": 2,
|
||||
"image": "artists/andy-nicholson.jpg"
|
||||
}
|
||||
],
|
||||
"ratings": [
|
||||
{
|
||||
"accountId": 0,
|
||||
"rating": 5,
|
||||
"bandId": 2
|
||||
"username": "hagemeister93",
|
||||
"rating": 5
|
||||
},
|
||||
{
|
||||
"accountId": 1,
|
||||
"rating": 3,
|
||||
"bandId": 2
|
||||
"username": "katjaStoiber",
|
||||
"rating": 3
|
||||
},
|
||||
{
|
||||
"accountId": 2,
|
||||
"rating": 4,
|
||||
"bandId": 2
|
||||
"username": "oetkerohnek",
|
||||
"rating": 4
|
||||
}
|
||||
],
|
||||
"concertGroups":[
|
||||
{
|
||||
"name": "European Tour",
|
||||
"image": "events/european-tour-arctic-monkeys.jpg",
|
||||
"concerts": [
|
||||
{
|
||||
"date": "2025-01-21",
|
||||
"price": 67.90,
|
||||
"inStock": 994,
|
||||
"location": "Kulturzentrum Faust"
|
||||
},
|
||||
{
|
||||
"date": "2024-11-15",
|
||||
"price": 79.90,
|
||||
"inStock": 1073,
|
||||
"location": "LANXESS arena"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"name": "Coldplay",
|
||||
"foundingYear": 1997,
|
||||
"descriptionEn": "Coldplay are a British rock band formed in London in 1997. They consist of vocalist and pianist Chris Martin, guitarist Jonny Buckland, bassist Guy Berryman, drummer and percussionist Will Champion, and manager Phil Harvey. They are best known for their live performances, and for impacting popular culture through their artistry, advocacy and achievements.",
|
||||
@@ -215,52 +269,70 @@
|
||||
],
|
||||
"imageMembers": "bands/coldplay-members.jpg",
|
||||
"logo": "bands/coldplay-logo.jpg",
|
||||
"genreId": [
|
||||
2,
|
||||
9
|
||||
"genres": [
|
||||
"Alternative Rock",
|
||||
"Pop-Rock"
|
||||
],
|
||||
"members": [
|
||||
{
|
||||
"name": "Chris Martin",
|
||||
"bandId": 3,
|
||||
"image": "artists/chris-martin.jpg"
|
||||
},
|
||||
{
|
||||
"name": "Jonny Buckland",
|
||||
"bandId": 3,
|
||||
"image": "artists/jonny-buckland.jpg"
|
||||
},
|
||||
{
|
||||
"name": "Guy Berryman",
|
||||
"bandId": 3,
|
||||
"image": "artists/guy-berryman.jpg"
|
||||
},
|
||||
{
|
||||
"name": "Will Champion",
|
||||
"bandId": 3,
|
||||
"image": "artists/will-champion.jpg"
|
||||
},
|
||||
{
|
||||
"name": "Phil Harvey",
|
||||
"bandId": 3,
|
||||
"image": "artists/phil-harvey.png"
|
||||
}
|
||||
],
|
||||
"ratings": [
|
||||
{
|
||||
"accountId": 0,
|
||||
"rating": 5,
|
||||
"bandId": 3
|
||||
"username": "hagemeister93",
|
||||
"rating": 5
|
||||
},
|
||||
{
|
||||
"accountId": 1,
|
||||
"rating": 4,
|
||||
"bandId": 3
|
||||
"username": "katjaStoiber",
|
||||
"rating": 4
|
||||
}
|
||||
],
|
||||
"concertGroups": [
|
||||
{
|
||||
"name": "Music of the Spheres",
|
||||
"image": "events/music-of-the-spheres.png",
|
||||
"concerts": [
|
||||
{
|
||||
"date": "2024-12-07",
|
||||
"price": 124.90,
|
||||
"inStock": 765,
|
||||
"location": "Astra Kulturhaus"
|
||||
},
|
||||
{
|
||||
"date": "2025-01-17",
|
||||
"price": 129.90,
|
||||
"inStock": 989,
|
||||
"location": "Waldbühne Berlin"
|
||||
},
|
||||
{
|
||||
"date": "2025-02-01",
|
||||
"price": 134.90,
|
||||
"inStock": 827,
|
||||
"location": "Olympiahalle München"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"name": "Foo Fighters",
|
||||
"foundingYear": 1994,
|
||||
"descriptionEn": "Foo Fighters is an American rock band formed in Seattle in 1994. Founded as a one-man project by former Nirvana drummer Dave Grohl, the lineup now consists of Grohl (lead vocals, guitar), Nate Mendel (bass), Chris Shiflett and Pat Smear (guitars), Rami Jaffee (keyboards), and Josh Freese (drums). Drummers William Goldsmith and Taylor Hawkins, along with guitarist Franz Stahl, are former members of the band.",
|
||||
@@ -272,52 +344,58 @@
|
||||
],
|
||||
"imageMembers": "bands/foo-fighters-members.jpg",
|
||||
"logo": "bands/foo-fighters-logo.png",
|
||||
"genreId": [
|
||||
2,
|
||||
10
|
||||
"genres": [
|
||||
"Alternative Rock",
|
||||
"Post-Grunge"
|
||||
],
|
||||
"members": [
|
||||
{
|
||||
"name": "Dave Grohl",
|
||||
"bandId": 4,
|
||||
"image": "artists/dave-grohl.jpg"
|
||||
},
|
||||
{
|
||||
"name": "Pat Smear",
|
||||
"bandId": 4,
|
||||
"image": "artists/pat-smear.jpg"
|
||||
},
|
||||
{
|
||||
"name": "Nate Mendel",
|
||||
"bandId": 4,
|
||||
"image": "artists/nate-mendel.jpg"
|
||||
},
|
||||
{
|
||||
"name": "Chris Shiflett",
|
||||
"bandId": 4,
|
||||
"image": "artists/chris-shiflett.jpg"
|
||||
},
|
||||
{
|
||||
"name": "Rami Jaffee",
|
||||
"bandId": 4,
|
||||
"image": "artists/rami-jaffee.jpg"
|
||||
},
|
||||
{
|
||||
"name": "Josh Freese",
|
||||
"bandId": 4,
|
||||
"image": "artists/josh-freese.jpg"
|
||||
}
|
||||
],
|
||||
"ratings": [
|
||||
{
|
||||
"accountId": 0,
|
||||
"rating": 5,
|
||||
"bandId": 4
|
||||
"username": "hagemeister93",
|
||||
"rating": 5
|
||||
}
|
||||
],
|
||||
"concertGroups": [
|
||||
{
|
||||
"name": "But Here We Are Tour",
|
||||
"image": "events/but-here-we-are.jpg",
|
||||
"concerts": [
|
||||
{
|
||||
"date": "2024-12-05",
|
||||
"price": 80,
|
||||
"inStock": 99,
|
||||
"location": "ZAG Arena"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 5,
|
||||
"name": "Billy Talent",
|
||||
"foundingYear": 1993,
|
||||
"descriptionEn": "Billy Talent is a Canadian rock band from Mississauga, Ontario. They formed in 1993 with lead vocalist Benjamin Kowalewicz, guitarist Ian D'Sa, bassist Jonathan Gallant, and drummer Aaron Solowoniuk. There have been no lineup changes, although Solowoniuk has been on hiatus from the band since 2016 due to a relapse of multiple sclerosis. In the three decades since their inception, Billy Talent has sold well over a million physical albums in Canada alone and nearly 3 million albums internationally. During their most successful period, they were ranked as one of the top 10 best-selling native bands in Canada.",
|
||||
@@ -329,59 +407,70 @@
|
||||
],
|
||||
"imageMembers": "bands/billy-talent-members.jpg",
|
||||
"logo": "bands/billy-talent-logo.png",
|
||||
"genreId": [
|
||||
2,
|
||||
11,
|
||||
12,
|
||||
13
|
||||
"genres": [
|
||||
"Alternative Rock",
|
||||
"Punk-Rock",
|
||||
"Post-Hardcore",
|
||||
"Pop-Punk"
|
||||
],
|
||||
"members": [
|
||||
{
|
||||
"name": "Benjamin Kowalewicz",
|
||||
"bandId": 5,
|
||||
"image": "benjamin-kowalewicz.jpg"
|
||||
},
|
||||
{
|
||||
"name": "Ian D'Sa ",
|
||||
"bandId": 5,
|
||||
"image": "artists/ian-d-sa.jpg"
|
||||
},
|
||||
{
|
||||
"name": "Jonathan Gallant",
|
||||
"bandId": 5,
|
||||
"image": "artists/jonathan-gallant.jpg"
|
||||
},
|
||||
{
|
||||
"name": "Jordan Hastings",
|
||||
"bandId": 5,
|
||||
"image": "artists/jordan-hastings.jpg"
|
||||
},
|
||||
{
|
||||
"name": "Josh Freese",
|
||||
"bandId": 5,
|
||||
"image": "artists/josh-freese.jpg"
|
||||
}
|
||||
],
|
||||
"ratings": [
|
||||
{
|
||||
"accountId": 0,
|
||||
"rating": 5,
|
||||
"bandId": 5
|
||||
"username": "hagemeister93",
|
||||
"rating": 5
|
||||
},
|
||||
{
|
||||
"accountId": 1,
|
||||
"rating": 3,
|
||||
"bandId": 5
|
||||
"username": "katjaStoiber",
|
||||
"rating": 3
|
||||
},
|
||||
{
|
||||
"accountId": 2,
|
||||
"rating": 4,
|
||||
"bandId": 5
|
||||
"username": "oetkerohnek",
|
||||
"rating": 4
|
||||
}
|
||||
],
|
||||
"concertGroups": [
|
||||
{
|
||||
"name": "Crisis of Faith",
|
||||
"image": "events/crisis-of-faith-tour.jpg",
|
||||
"concerts": [
|
||||
{
|
||||
"date": "2025-01-12",
|
||||
"price": 81.90,
|
||||
"inStock": 173,
|
||||
"location": "ZAG Arena"
|
||||
},
|
||||
{
|
||||
"date": "2025-02-01",
|
||||
"price": 84.90,
|
||||
"inStock": 192,
|
||||
"location": "Muffatwerk"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 6,
|
||||
"name": "Royal Blood",
|
||||
"foundingYear": 2013,
|
||||
"descriptionEn": "Royal Blood are an English rock duo formed in Littlehampton in 2011. The current lineup consists of Mike Kerr (vocals, bass guitar, piano) and Ben Thatcher (drums). Their signature sound is built around Kerr's bass playing style, which sees him using various effects pedals and amps to make his bass guitar sound like an electric guitar and bass guitar at the same time. The duo were signed by Warner Chappell Music in 2013 and have since released four studio albums: Royal Blood (2014), How Did We Get So Dark? (2017), Typhoons (2021), and Back to the Water Below (2023).",
|
||||
@@ -393,42 +482,56 @@
|
||||
],
|
||||
"imageMembers": "bands/royal-blood-members.jpg",
|
||||
"logo": "bands/royal-blood-logo.jpg",
|
||||
"genreId": [
|
||||
8,
|
||||
14
|
||||
"genres": [
|
||||
"Garage Rock",
|
||||
"Bluesrock"
|
||||
],
|
||||
"members": [
|
||||
{
|
||||
"name": "Mike Kerr",
|
||||
"bandId": 6,
|
||||
"image": "artists/mike-kerr.jpg"
|
||||
},
|
||||
{
|
||||
"name": "Ben Thatcher",
|
||||
"bandId": 6,
|
||||
"image": "artists/ben-thatcher.jpg"
|
||||
}
|
||||
],
|
||||
"ratings": [
|
||||
{
|
||||
"accountId": 0,
|
||||
"rating": 5,
|
||||
"bandId": 6
|
||||
"username": "hagemeister93",
|
||||
"rating": 5
|
||||
},
|
||||
{
|
||||
"accountId": 1,
|
||||
"rating": 4,
|
||||
"bandId": 6
|
||||
"username": "katjaStoiber",
|
||||
"rating": 4
|
||||
},
|
||||
{
|
||||
"accountId": 2,
|
||||
"rating": 4,
|
||||
"bandId": 6
|
||||
"username": "oetkerohnek",
|
||||
"rating": 4
|
||||
}
|
||||
],
|
||||
"concertGroups": [
|
||||
{
|
||||
"name": "Back to the Water Below",
|
||||
"image": "events/back-to-the-water-below.jpg",
|
||||
"concerts": [
|
||||
{
|
||||
"date": "2025-02-27",
|
||||
"price": 67.90,
|
||||
"inStock": 847,
|
||||
"location": "Kulturzentrum Faust"
|
||||
},
|
||||
{
|
||||
"date": "2025-03-06",
|
||||
"price": 64.90,
|
||||
"inStock": 245,
|
||||
"location": "Waldbühne Berlin"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 7,
|
||||
"name": "Muse",
|
||||
"foundingYear": 1994,
|
||||
"descriptionEn": "Muse are an English rock band from Teignmouth, Devon, formed in 1994. The band consists of Matt Bellamy (lead vocals, guitar, keyboards), Chris Wolstenholme (bass guitar, backing vocals), and Dominic Howard (drums, percussion).",
|
||||
@@ -440,43 +543,69 @@
|
||||
],
|
||||
"imageMembers": "bands/muse-members.jpg",
|
||||
"logo": "bands/muse-logo.jpg",
|
||||
"genreId": [
|
||||
2,
|
||||
15,
|
||||
16
|
||||
"genres": [
|
||||
"Alternative Rock",
|
||||
"New Prog",
|
||||
"Hard Rock"
|
||||
],
|
||||
"members": [
|
||||
{
|
||||
"name": "Matthew Bellamy",
|
||||
"bandId": 7,
|
||||
"image": "artists/matthew-bellamy.jpg"
|
||||
},
|
||||
{
|
||||
"name": "Dominic Howard",
|
||||
"bandId": 7,
|
||||
"image": "artists/dominic-howard.jpg"
|
||||
},
|
||||
{
|
||||
"name": "Chris Wolstenholme",
|
||||
"bandId": 7,
|
||||
"image": "artists/chris-wolstenholme.jpg"
|
||||
}
|
||||
],
|
||||
"ratings": [
|
||||
{
|
||||
"accountId": 0,
|
||||
"rating": 5,
|
||||
"bandId": 7
|
||||
"username": "hagemeister93",
|
||||
"rating": 5
|
||||
},
|
||||
{
|
||||
"accountId": 1,
|
||||
"rating": 4,
|
||||
"bandId": 7
|
||||
"username": "katjaStoiber",
|
||||
"rating": 4
|
||||
},
|
||||
{
|
||||
"accountId": 2,
|
||||
"rating": 4,
|
||||
"bandId": 7
|
||||
"username": "oetkerohnek",
|
||||
"rating": 4
|
||||
}
|
||||
],
|
||||
"concertGroups": [
|
||||
{
|
||||
"name": "Will of the People Tour",
|
||||
"image": "events/will-of-the-people-tour.jpg",
|
||||
"concerts": [
|
||||
{
|
||||
"date": "2025-01-15",
|
||||
"price": 67.90,
|
||||
"inStock": 847,
|
||||
"location": "ZAG Arena"
|
||||
},
|
||||
{
|
||||
"date": "2025-01-23",
|
||||
"price": 64.90,
|
||||
"inStock": 245,
|
||||
"location": "Olympiastadion Berlin"
|
||||
},
|
||||
{
|
||||
"date": "2025-02-02",
|
||||
"price": 64.90,
|
||||
"inStock": 245,
|
||||
"location": "Astra Kulturhaus"
|
||||
},
|
||||
{
|
||||
"date": "2025-02-05",
|
||||
"price": 64.90,
|
||||
"inStock": 245,
|
||||
"location": "Astra Kulturhaus"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -5,7 +5,6 @@
|
||||
"country": "Germany",
|
||||
"locations": [
|
||||
{
|
||||
"id": 0,
|
||||
"name": "Swiss Life Hall",
|
||||
"address": "Ferdinand-Wilhelm-Fricke-Weg 8",
|
||||
"imageIndoor": "locations/swiss-life-hall-indoor.jpg",
|
||||
@@ -56,7 +55,6 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 1,
|
||||
"name": "Capitol",
|
||||
"address": "Schwarzer Bär 2",
|
||||
"imageIndoor": "locations/capitol-indoor.jpg",
|
||||
@@ -72,7 +70,6 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"name": "ZAG Arena",
|
||||
"address": "EXPO-Plaza 7",
|
||||
"imageIndoor": "locations/zag-arena-indoor.jpg",
|
||||
@@ -144,7 +141,6 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"name": "Kulturzentrum Faust",
|
||||
"address": "Zur Bettfedernfabrik 3",
|
||||
"imageIndoor": "locations/faust-hannover-indoor.jpg",
|
||||
@@ -166,7 +162,6 @@
|
||||
"country": "Germany",
|
||||
"locations": [
|
||||
{
|
||||
"id": 4,
|
||||
"name": "Olympiahalle München",
|
||||
"address": "Spiridon-Louis-Ring 21",
|
||||
"imageIndoor": "locations/olympiahalle-munich-indoor.jpg",
|
||||
@@ -217,7 +212,6 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 5,
|
||||
"name": "Schlachthof München",
|
||||
"address": "Zenettistraße 9",
|
||||
"imageIndoor": "locations/schlachthof-munich-indoor.jpg",
|
||||
@@ -233,7 +227,6 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 6,
|
||||
"name": "Muffatwerk",
|
||||
"address": "Zellstraße 4",
|
||||
"imageIndoor": "locations/muffatwerk-indoor.jpg",
|
||||
@@ -255,7 +248,6 @@
|
||||
"country": "Germany",
|
||||
"locations": [
|
||||
{
|
||||
"id": 7,
|
||||
"name": "Volksparkstadion",
|
||||
"address": "Sylvesterallee 7",
|
||||
"imageIndoor": "locations/volksparkstadion-hamburg-indoor.jpg",
|
||||
@@ -327,7 +319,6 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 8,
|
||||
"name": "Barclays Arena",
|
||||
"address": "Sylvesterallee 10",
|
||||
"imageIndoor": "locations/barclays-arena-indoor.jpg",
|
||||
@@ -363,7 +354,6 @@
|
||||
"country": "Germany",
|
||||
"locations": [
|
||||
{
|
||||
"id": 9,
|
||||
"name": "Waldbühne Berlin",
|
||||
"address": "Am Glockenturm",
|
||||
"imageIndoor": "locations/waldbuehne-berlin-indoor.jpg",
|
||||
@@ -393,7 +383,6 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 10,
|
||||
"name": "Olympiastadion Berlin",
|
||||
"address": "Olympischer Platz 3",
|
||||
"imageIndoor": "locations/olympiastadion-berlin-indoor.jpg",
|
||||
@@ -444,7 +433,6 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 11,
|
||||
"name": "Uber Arena Berlin",
|
||||
"address": "Uber-Platz 1",
|
||||
"imageIndoor": "locations/uber-arena-berlin-indoor.jpg",
|
||||
@@ -495,7 +483,6 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 12,
|
||||
"name": "Columbiahalle",
|
||||
"address": "Columbiadamm 13-21",
|
||||
"imageIndoor": "locations/columbiahalle-indoor.jpg",
|
||||
@@ -525,7 +512,6 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 13,
|
||||
"name": "Astra Kulturhaus",
|
||||
"address": "Revaler Straße 99",
|
||||
"imageIndoor": "locations/astra-kulturhaus-indoor.jpg",
|
||||
@@ -547,7 +533,6 @@
|
||||
"country": "Germany",
|
||||
"locations": [
|
||||
{
|
||||
"id": 14,
|
||||
"name": "LANXESS arena",
|
||||
"address": "Willy-Brandt-Platz",
|
||||
"imageIndoor": "locations/lanxess-arena-indoor.jpg",
|
||||
@@ -598,7 +583,6 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 15,
|
||||
"name": "Palladium",
|
||||
"address": "Schanzenstraße 40",
|
||||
"imageIndoor": "locations/palladium-indoor.jpg",
|
||||
@@ -614,7 +598,6 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 16,
|
||||
"name": "E-Werk",
|
||||
"address": "Schanzenstraße 37",
|
||||
"imageIndoor": "locations/e-werk-indoor.jpg",
|
||||
|
||||
@@ -1,230 +0,0 @@
|
||||
{
|
||||
"data": [
|
||||
{
|
||||
"id": 0,
|
||||
"name": "Unlimited Love",
|
||||
"bandId": 0,
|
||||
"offered": true,
|
||||
"image": "events/unlimited-love-tour.jpg",
|
||||
"concerts": [
|
||||
{
|
||||
"id": 0,
|
||||
"date": "2024-10-18",
|
||||
"price": 92,
|
||||
"inStock": 0,
|
||||
"locationId": 0
|
||||
},
|
||||
{
|
||||
"id": 1,
|
||||
"date": "2024-10-19",
|
||||
"price": 92,
|
||||
"inStock": 170,
|
||||
"locationId": 0
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"date": "2024-10-23",
|
||||
"price": 119.90,
|
||||
"inStock": 8736,
|
||||
"locationId": 4
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"date": "2024-10-26",
|
||||
"price": 114.90,
|
||||
"inStock": 2793,
|
||||
"locationId": 8
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"date": "2024-11-02",
|
||||
"price": 124.90,
|
||||
"inStock": 3079,
|
||||
"locationId": 12
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 1,
|
||||
"name": "The Bends",
|
||||
"bandId": 1,
|
||||
"offered": true,
|
||||
"image": "events/the-bends-tour.jpg",
|
||||
"concerts": [
|
||||
{
|
||||
"id": 5,
|
||||
"date": "2024-11-30",
|
||||
"price": 108,
|
||||
"inStock": 1200,
|
||||
"locationId": 1
|
||||
},
|
||||
{
|
||||
"id": 6,
|
||||
"date": "2024-12-01",
|
||||
"price": 104,
|
||||
"inStock": 1800,
|
||||
"locationId": 5
|
||||
},
|
||||
{
|
||||
"id": 7,
|
||||
"date": "2024-12-07",
|
||||
"price": 99.90,
|
||||
"inStock": 2438,
|
||||
"locationId": 9
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"name": "European Tour",
|
||||
"bandId": 2,
|
||||
"offered": true,
|
||||
"image": "events/european-tour-arctic-monkeys.jpg",
|
||||
"concerts": [
|
||||
{
|
||||
"id": 8,
|
||||
"date": "2025-01-21",
|
||||
"price": 67.90,
|
||||
"inStock": 994,
|
||||
"locationId": 3
|
||||
},
|
||||
{
|
||||
"id": 9,
|
||||
"date": "2024-11-15",
|
||||
"price": 79.90,
|
||||
"inStock": 1073,
|
||||
"locationId": 14
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"name": "Music of the Spheres",
|
||||
"bandId": 3,
|
||||
"offered": true,
|
||||
"image": "events/music-of-the-spheres.png",
|
||||
"concerts": [
|
||||
{
|
||||
"id": 10,
|
||||
"date": "2024-12-07",
|
||||
"price": 124.90,
|
||||
"inStock": 765,
|
||||
"locationId": 13
|
||||
},
|
||||
{
|
||||
"id": 11,
|
||||
"date": "2025-01-17",
|
||||
"price": 129.90,
|
||||
"inStock": 989,
|
||||
"locationId": 9
|
||||
},
|
||||
{
|
||||
"id": 12,
|
||||
"date": "2025-02-01",
|
||||
"price": 134.90,
|
||||
"inStock": 827,
|
||||
"locationId": 4
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"name": "But Here We Are Tour",
|
||||
"bandId": 4,
|
||||
"offered": true,
|
||||
"image": "events/but-here-we-are.jpg",
|
||||
"concerts": [
|
||||
{
|
||||
"id": 13,
|
||||
"date": "2024-12-05",
|
||||
"price": 80,
|
||||
"inStock": 99,
|
||||
"locationId": 2
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 5,
|
||||
"name": "Crisis of Faith",
|
||||
"bandId": 5,
|
||||
"offered": true,
|
||||
"image": "events/crisis-of-faith-tour.jpg",
|
||||
"concerts": [
|
||||
{
|
||||
"id": 14,
|
||||
"date": "2025-01-12",
|
||||
"price": 81.90,
|
||||
"inStock": 173,
|
||||
"locationId": 2
|
||||
},
|
||||
{
|
||||
"id": 15,
|
||||
"date": "2025-02-01",
|
||||
"price": 84.90,
|
||||
"inStock": 192,
|
||||
"locationId": 6
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 6,
|
||||
"name": "Back to the Water Below",
|
||||
"bandId": 6,
|
||||
"offered": true,
|
||||
"image": "events/back-to-the-water-below.jpg",
|
||||
"concerts": [
|
||||
{
|
||||
"id": 16,
|
||||
"date": "2025-02-27",
|
||||
"price": 67.90,
|
||||
"inStock": 847,
|
||||
"locationId": 3
|
||||
},
|
||||
{
|
||||
"id": 17,
|
||||
"date": "2025-03-06",
|
||||
"price": 64.90,
|
||||
"inStock": 245,
|
||||
"locationId": 9
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 7,
|
||||
"name": "Will of the People Tour",
|
||||
"bandId": 7,
|
||||
"offered": true,
|
||||
"image": "events/will-of-the-people-tour.jpg",
|
||||
"concerts": [
|
||||
{
|
||||
"id": 18,
|
||||
"date": "2025-01-15",
|
||||
"price": 67.90,
|
||||
"inStock": 847,
|
||||
"locationId": 2
|
||||
},
|
||||
{
|
||||
"id": 19,
|
||||
"date": "2025-01-23",
|
||||
"price": 64.90,
|
||||
"inStock": 245,
|
||||
"locationId": 10
|
||||
},
|
||||
{
|
||||
"id": 20,
|
||||
"date": "2025-02-02",
|
||||
"price": 64.90,
|
||||
"inStock": 245,
|
||||
"locationId": 13
|
||||
},
|
||||
{
|
||||
"id": 21,
|
||||
"date": "2025-02-05",
|
||||
"price": 64.90,
|
||||
"inStock": 245,
|
||||
"locationId": 13
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,72 +0,0 @@
|
||||
{
|
||||
"data": [
|
||||
{
|
||||
"id": 0,
|
||||
"name": "Funk Rock"
|
||||
},
|
||||
{
|
||||
"id": 1,
|
||||
"name": "Art Rock"
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"name": "Alternative Rock"
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"name": "Crossover"
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"name": "Electronica"
|
||||
},
|
||||
{
|
||||
"id": 5,
|
||||
"name": "Post-Rock"
|
||||
},
|
||||
{
|
||||
"id": 6,
|
||||
"name": "Britpop"
|
||||
},
|
||||
{
|
||||
"id": 7,
|
||||
"name": "Post-Punk"
|
||||
},
|
||||
{
|
||||
"id": 8,
|
||||
"name": "Garage Rock"
|
||||
},
|
||||
{
|
||||
"id": 9,
|
||||
"name": "Pop-Rock"
|
||||
},
|
||||
{
|
||||
"id": 10,
|
||||
"name": "Post-Grunge"
|
||||
},
|
||||
{
|
||||
"id": 11,
|
||||
"name": "Punk-Rock"
|
||||
},
|
||||
{
|
||||
"id": 12,
|
||||
"name": "Post-Hardcore"
|
||||
},
|
||||
{
|
||||
"id": 13,
|
||||
"name": "Pop-Punk"
|
||||
},
|
||||
{
|
||||
"id": 14,
|
||||
"name": "Bluesrock"
|
||||
},
|
||||
{
|
||||
"id": 15,
|
||||
"name": "New Prog"
|
||||
},
|
||||
{
|
||||
"id": 16,
|
||||
"name": "Hard Rock"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,8 +1,7 @@
|
||||
{
|
||||
"data": [
|
||||
{
|
||||
"id": 0,
|
||||
"accountId": 0,
|
||||
"username": "hagemeister93",
|
||||
"shippingProgress": 4,
|
||||
"addressId": 0,
|
||||
"paymentId": 0,
|
||||
@@ -17,8 +16,7 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 1,
|
||||
"accountId": 3,
|
||||
"username": "duranduran",
|
||||
"shippingProgress": 5,
|
||||
"addressId": 4,
|
||||
"paymentId": 3,
|
||||
@@ -40,8 +38,7 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"accountId": 3,
|
||||
"username": "duranduran",
|
||||
"shippingProgress": 2,
|
||||
"addressId": 5,
|
||||
"paymentId": 3,
|
||||
|
||||
@@ -14,7 +14,6 @@ import { Band } from "./models/acts/band.model"
|
||||
import { Concert } from "./models/acts/concert.model"
|
||||
import { Member } from "./models/acts/member.model"
|
||||
import { Rating } from "./models/acts/rating.model"
|
||||
import { Event } from "./models/acts/event.model"
|
||||
import { City } from "./models/locations/city.model"
|
||||
import { BandGenre } from "./models/acts/bandGenre.model"
|
||||
import { Seat } from "./models/locations/seat.model"
|
||||
@@ -37,14 +36,14 @@ export const sequelize = new Sequelize({
|
||||
models: [
|
||||
AccountRole, Account, Payment, Address,
|
||||
City, Location, SeatGroup, SeatRow, Seat,
|
||||
Genre, Band, BandGenre, Rating, Member, Event, Concert,
|
||||
Genre, Band, BandGenre, Rating, Member, Concert,
|
||||
Order, Ticket,
|
||||
Exercise, ExerciseGroup
|
||||
]
|
||||
})
|
||||
|
||||
export function startDatabase() {
|
||||
let recreateDb = false
|
||||
let recreateDb = true
|
||||
|
||||
// Create database and tables
|
||||
sequelize.sync({ force: recreateDb })
|
||||
|
||||
@@ -2,8 +2,8 @@ import { BelongsTo, BelongsToMany, Column, DataType, ForeignKey, HasMany, Model,
|
||||
import { Member } from "./member.model";
|
||||
import { Genre } from "./genre.model";
|
||||
import { Rating } from "./rating.model";
|
||||
import { Event } from "./event.model";
|
||||
import { BandGenre } from "./bandGenre.model";
|
||||
import { Concert } from "./concert.model";
|
||||
|
||||
@Table({ timestamps: false })
|
||||
export class Band extends Model {
|
||||
@@ -45,8 +45,8 @@ export class Band extends Model {
|
||||
@HasMany(() => Rating)
|
||||
ratings: Rating[]
|
||||
|
||||
@HasMany(() => Event)
|
||||
events: Event[]
|
||||
@HasMany(() => Concert)
|
||||
concerts: Concert[]
|
||||
|
||||
@BelongsToMany(() => Genre, () => BandGenre)
|
||||
genres: Genre[]
|
||||
|
||||
@@ -1,33 +1,39 @@
|
||||
import { BelongsTo, Column, ForeignKey, HasMany, Model, Table } from "sequelize-typescript";
|
||||
import { Location } from "./../locations/location.model";
|
||||
import { Event } from "./event.model";
|
||||
import { Ticket } from "../ordering/ticket.model";
|
||||
import { Band } from "./band.model";
|
||||
|
||||
@Table({ timestamps: false })
|
||||
export class Concert extends Model {
|
||||
@Column
|
||||
date: String
|
||||
|
||||
@Column
|
||||
name: String
|
||||
|
||||
@Column
|
||||
price: Number
|
||||
|
||||
@Column
|
||||
image: String
|
||||
|
||||
@Column
|
||||
inStock: Number
|
||||
|
||||
@Column
|
||||
offered: Boolean
|
||||
|
||||
@ForeignKey(() => Band)
|
||||
@Column
|
||||
bandId: Number
|
||||
|
||||
@ForeignKey(() => Location)
|
||||
@Column
|
||||
locationId: Number
|
||||
|
||||
@ForeignKey(() => Event)
|
||||
@Column
|
||||
eventId: Number
|
||||
|
||||
|
||||
// Relations
|
||||
|
||||
@BelongsTo(() => Event)
|
||||
event: Event
|
||||
|
||||
@BelongsTo(() => Location)
|
||||
location: Location
|
||||
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
import { BelongsTo, Column, ForeignKey, HasMany, Model, Table } from "sequelize-typescript";
|
||||
import { Band } from "./band.model";
|
||||
import { Concert } from "./concert.model";
|
||||
|
||||
@Table({ timestamps: false })
|
||||
export class Event extends Model {
|
||||
@Column
|
||||
name: String
|
||||
|
||||
@ForeignKey(() => Band)
|
||||
bandId: Number
|
||||
|
||||
@Column
|
||||
offered: Boolean
|
||||
|
||||
@Column
|
||||
image: String
|
||||
|
||||
|
||||
// Relations
|
||||
|
||||
@BelongsTo(() => Band)
|
||||
band: Band
|
||||
|
||||
@HasMany(() => Concert)
|
||||
concerts: Concert[]
|
||||
}
|
||||
@@ -3,7 +3,6 @@ import { Band } from "../models/acts/band.model";
|
||||
import { Request, Response, Router } from "express";
|
||||
import { Rating } from "../models/acts/rating.model";
|
||||
import { Genre } from "../models/acts/genre.model";
|
||||
import { Event } from "../models/acts/event.model";
|
||||
import { Concert } from "../models/acts/concert.model";
|
||||
import { Location } from "../models/locations/location.model";
|
||||
import { City } from "../models/locations/city.model";
|
||||
@@ -28,26 +27,18 @@ band.get("/", (req: Request, res: Response) => {
|
||||
}
|
||||
},
|
||||
{
|
||||
model: Event,
|
||||
model: Concert,
|
||||
include: [
|
||||
{
|
||||
model: Concert,
|
||||
include: [
|
||||
{
|
||||
model: Location,
|
||||
include: [ City ],
|
||||
attributes: {
|
||||
exclude: [ "id" ]
|
||||
}
|
||||
}
|
||||
],
|
||||
model: Location,
|
||||
include: [ City ],
|
||||
attributes: {
|
||||
exclude: [ "id", "tourId", "locationId" ]
|
||||
exclude: [ "id" ]
|
||||
}
|
||||
}
|
||||
],
|
||||
attributes: {
|
||||
exclude: [ "id", "bandId" ]
|
||||
exclude: [ "id", "tourId", "locationId" ]
|
||||
}
|
||||
},
|
||||
Genre
|
||||
@@ -78,26 +69,18 @@ band.get("/band/:name", (req: Request, res: Response) => {
|
||||
}
|
||||
},
|
||||
{
|
||||
model: Event,
|
||||
model: Concert,
|
||||
include: [
|
||||
{
|
||||
model: Concert,
|
||||
include: [
|
||||
{
|
||||
model: Location,
|
||||
include: [ City ],
|
||||
attributes: {
|
||||
exclude: [ "id" ]
|
||||
}
|
||||
}
|
||||
],
|
||||
model: Location,
|
||||
include: [ City ],
|
||||
attributes: {
|
||||
exclude: [ "tourId", "locationId" ]
|
||||
exclude: [ "id" ]
|
||||
}
|
||||
}
|
||||
],
|
||||
attributes: {
|
||||
exclude: [ "bandId" ]
|
||||
exclude: [ "tourId", "locationId" ]
|
||||
}
|
||||
},
|
||||
Genre
|
||||
@@ -120,17 +103,7 @@ band.get("/search", (req: Request, res: Response) => {
|
||||
[Op.substring]: req.query.value
|
||||
},
|
||||
},
|
||||
include: [
|
||||
{
|
||||
model: Event,
|
||||
include: [
|
||||
Concert
|
||||
]
|
||||
},
|
||||
{
|
||||
model: Genre
|
||||
}
|
||||
]
|
||||
include: [ Concert, Genre ]
|
||||
})
|
||||
.then(bands => {
|
||||
res.status(200).json(bands)
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import { Location } from "../models/locations/location.model";
|
||||
import { Concert } from "../models/acts/concert.model";
|
||||
import { Request, Response, Router } from "express";
|
||||
import { Event } from "../models/acts/event.model";
|
||||
import { City } from "../models/locations/city.model";
|
||||
import { SeatGroup } from "../models/locations/seatGroup.model";
|
||||
import { SeatRow } from "../models/locations/seatRow.model";
|
||||
@@ -14,14 +13,9 @@ export const concert = Router()
|
||||
|
||||
concert.get("/concert/:id", (req: Request, res: Response) => {
|
||||
Concert.findByPk(req.params.id, {
|
||||
include: [
|
||||
include: [
|
||||
{
|
||||
model: Event,
|
||||
include: [
|
||||
{
|
||||
model: Band
|
||||
}
|
||||
]
|
||||
model: Band,
|
||||
},
|
||||
{
|
||||
model: Location,
|
||||
|
||||
@@ -1,113 +0,0 @@
|
||||
import { Concert } from "../models/acts/concert.model";
|
||||
import { Band } from "../models/acts/band.model";
|
||||
import { Event } from "../models/acts/event.model";
|
||||
import { Request, Response, Router } from "express";
|
||||
import { Location } from "../models/locations/location.model";
|
||||
import { Genre } from "../models/acts/genre.model";
|
||||
import { City } from "../models/locations/city.model";
|
||||
import { Op } from "sequelize";
|
||||
|
||||
export const events = Router()
|
||||
|
||||
events.get("/", async (req: Request, res: Response) => {
|
||||
let cityName = req.query.city
|
||||
let genreName = req.query.genre
|
||||
let sort = req.query.sort
|
||||
let count = req.query.count
|
||||
let cityFilter = {}
|
||||
let genreFilter = {}
|
||||
|
||||
if (cityName != undefined) {
|
||||
cityFilter = {
|
||||
model: City,
|
||||
where: { name: cityName }
|
||||
}
|
||||
} else {
|
||||
cityFilter = {
|
||||
model: City
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (genreName != undefined) {
|
||||
genreFilter = {
|
||||
model: Genre,
|
||||
where: { name: genreName }
|
||||
}
|
||||
} else {
|
||||
genreFilter = {
|
||||
model: Genre
|
||||
}
|
||||
}
|
||||
|
||||
Event.findAll({
|
||||
include: [
|
||||
{
|
||||
model: Concert,
|
||||
required: true,
|
||||
include: [
|
||||
{
|
||||
model: Location,
|
||||
required: true,
|
||||
include: [
|
||||
cityFilter
|
||||
]
|
||||
}
|
||||
],
|
||||
},
|
||||
{
|
||||
model: Band,
|
||||
required: true,
|
||||
include: [
|
||||
genreFilter
|
||||
]
|
||||
}
|
||||
]
|
||||
})
|
||||
.then(events => {
|
||||
if (sort != undefined) {
|
||||
events.sort((event1, event2) => {
|
||||
if (sort == "desc") {
|
||||
return event2.dataValues.concerts.length - event1.dataValues.concerts.length
|
||||
} else if (sort == "asc") {
|
||||
return event1.dataValues.concerts.length - event2.dataValues.concerts.length
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
if (count != undefined) {
|
||||
events.splice(Number(count))
|
||||
}
|
||||
|
||||
res.status(200).json(events)
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
// Event search
|
||||
events.get("/search", (req: Request, res: Response) => {
|
||||
Event.findAll({
|
||||
where: {
|
||||
name: {
|
||||
[Op.substring]: req.query.value
|
||||
}
|
||||
},
|
||||
include: [
|
||||
{
|
||||
model: Concert,
|
||||
required: true,
|
||||
include: [
|
||||
{
|
||||
model: Location,
|
||||
}
|
||||
],
|
||||
},
|
||||
{
|
||||
model: Band,
|
||||
}
|
||||
]
|
||||
})
|
||||
.then(events => {
|
||||
res.status(200).json(events)
|
||||
})
|
||||
})
|
||||
@@ -2,7 +2,6 @@ import { Concert } from "../models/acts/concert.model";
|
||||
import { City } from "../models/locations/city.model";
|
||||
import { Location } from "../models/locations/location.model";
|
||||
import { Request, Response, Router } from "express";
|
||||
import { Event } from "../models/acts/event.model";
|
||||
import { Band } from "../models/acts/band.model";
|
||||
import { SeatGroup } from "../models/locations/seatGroup.model";
|
||||
import { Seat } from "../models/locations/seat.model";
|
||||
@@ -20,15 +19,7 @@ location.get("/", (req: Request, res: Response) => {
|
||||
City,
|
||||
{
|
||||
model: Concert,
|
||||
include: [
|
||||
{
|
||||
model: Event,
|
||||
include: [ Band ]
|
||||
}
|
||||
],
|
||||
attributes: {
|
||||
exclude: [ "locationId", "tourId" ]
|
||||
}
|
||||
include: [ Band ],
|
||||
},
|
||||
{
|
||||
model: SeatGroup,
|
||||
@@ -70,15 +61,7 @@ location.get("/location/:urlName", (req: Request, res: Response) => {
|
||||
City,
|
||||
{
|
||||
model: Concert,
|
||||
include: [
|
||||
{
|
||||
model: Event,
|
||||
include: [ Band ]
|
||||
}
|
||||
],
|
||||
attributes: {
|
||||
exclude: [ "locationId", "tourId" ]
|
||||
}
|
||||
include: [ Band ],
|
||||
},
|
||||
{
|
||||
model: SeatGroup,
|
||||
|
||||
@@ -6,7 +6,6 @@ import { Payment } from "../models/user/payment.model";
|
||||
import { Address } from "../models/user/address.model";
|
||||
import { Band } from "../models/acts/band.model";
|
||||
import { Location } from "../models/locations/location.model";
|
||||
import { Event } from "../models/acts/event.model";
|
||||
import { City } from "../models/locations/city.model";
|
||||
import { Seat } from "../models/locations/seat.model";
|
||||
import { SeatRow } from "../models/locations/seatRow.model";
|
||||
@@ -26,8 +25,7 @@ order.get("/:id", (req: Request, res: Response) => {
|
||||
model: Concert,
|
||||
include: [
|
||||
{
|
||||
model: Event,
|
||||
include: [ Band ]
|
||||
model: Band
|
||||
},
|
||||
{
|
||||
model: Location,
|
||||
|
||||
@@ -10,7 +10,6 @@ import { Genre } from '../models/acts/genre.model'
|
||||
import { Band } from '../models/acts/band.model'
|
||||
import { Location } from '../models/locations/location.model'
|
||||
import { Concert } from '../models/acts/concert.model'
|
||||
import { Event } from '../models/acts/event.model'
|
||||
import { City } from '../models/locations/city.model'
|
||||
import { BandGenre } from '../models/acts/bandGenre.model'
|
||||
import { SeatGroup } from '../models/locations/seatGroup.model'
|
||||
@@ -22,11 +21,9 @@ import { ExerciseGroup } from '../models/exercises/exerciseGroup.model'
|
||||
import accounts from "./../data/accounts.json"
|
||||
import orders from "./../data/orders.json"
|
||||
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 citiesLocations from "./../data/cities-locations.json"
|
||||
import exercises from "./../data/exercises.json"
|
||||
import bands from "./../data/bands-concerts.json"
|
||||
|
||||
|
||||
/**
|
||||
@@ -40,7 +37,6 @@ export function deleteAllTables() {
|
||||
Member.destroy({ truncate: true })
|
||||
Genre.destroy({ truncate: true })
|
||||
Band.destroy({ truncate: true })
|
||||
Event.destroy({ truncate: true })
|
||||
|
||||
City.destroy({ truncate: true })
|
||||
Location.destroy({ truncate: true })
|
||||
@@ -80,7 +76,7 @@ export async function prepopulateDatabase() {
|
||||
deleteAllTables()
|
||||
|
||||
AccountRole.bulkCreate(accountRoles.data)
|
||||
Genre.bulkCreate(genres.data)
|
||||
//Genre.bulkCreate(genres.data)
|
||||
|
||||
for (let city of citiesLocations.data)
|
||||
{
|
||||
@@ -97,41 +93,42 @@ export async function prepopulateDatabase() {
|
||||
{
|
||||
seatGroup["locationId"] = locationDataset.id
|
||||
|
||||
await SeatGroup.create(seatGroup)
|
||||
.then(async seatGroupRes => {
|
||||
if (seatGroup.standingArea) {
|
||||
// In an area without seats, create one row with all "seats"
|
||||
await SeatRow.create({
|
||||
row: 0,
|
||||
seatGroupId: seatGroupRes.id
|
||||
})
|
||||
.then(async seatRowRes => {
|
||||
for (let i = 0; i < seatGroup.capacity; i++) {
|
||||
await Seat.create({
|
||||
seatNr: i + 1,
|
||||
seatRowId: seatRowRes.id
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
else
|
||||
{
|
||||
for (let row = 0; row < seatGroup.rows; row++) {
|
||||
await SeatRow.create({
|
||||
row: row + 1,
|
||||
seatGroupId: seatGroupRes.id
|
||||
})
|
||||
.then(async seatRowRes => {
|
||||
for (let col = 0; col < seatGroup.capacity / seatGroup.rows; col++) {
|
||||
await Seat.create({
|
||||
seatNr: col,
|
||||
seatRowId: seatRowRes.id
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
// todo activate
|
||||
// await SeatGroup.create(seatGroup)
|
||||
// .then(async seatGroupRes => {
|
||||
// if (seatGroup.standingArea) {
|
||||
// // In an area without seats, create one row with all "seats"
|
||||
// await SeatRow.create({
|
||||
// row: 0,
|
||||
// seatGroupId: seatGroupRes.id
|
||||
// })
|
||||
// .then(async seatRowRes => {
|
||||
// for (let i = 0; i < seatGroup.capacity; i++) {
|
||||
// await Seat.create({
|
||||
// seatNr: i + 1,
|
||||
// seatRowId: seatRowRes.id
|
||||
// })
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// for (let row = 0; row < seatGroup.rows; row++) {
|
||||
// await SeatRow.create({
|
||||
// row: row + 1,
|
||||
// seatGroupId: seatGroupRes.id
|
||||
// })
|
||||
// .then(async seatRowRes => {
|
||||
// for (let col = 0; col < seatGroup.capacity / seatGroup.rows; col++) {
|
||||
// await Seat.create({
|
||||
// seatNr: col,
|
||||
// seatRowId: seatRowRes.id
|
||||
// })
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
// }
|
||||
// })
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -142,74 +139,129 @@ export async function prepopulateDatabase() {
|
||||
// Account & Sub tables
|
||||
for (let account of accounts.data) {
|
||||
await Account.create(account)
|
||||
.then(dataset => {
|
||||
Address.bulkCreate(account.addresses)
|
||||
Payment.bulkCreate(account.payments)
|
||||
.then(async dataset => {
|
||||
for (let address of account.addresses) {
|
||||
await Address.create({
|
||||
accountId: dataset.dataValues.id,
|
||||
street: address.street,
|
||||
houseNumber: address.houseNumber,
|
||||
postalCode: address.postalCode,
|
||||
city: address.city
|
||||
})
|
||||
}
|
||||
|
||||
for (let payment of account.payments) {
|
||||
await Payment.create({
|
||||
accountId: dataset.dataValues.id,
|
||||
bankName: payment.bankName,
|
||||
iban: payment.iban
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
for(let band of bands.data) {
|
||||
for(let band of bands.bands) {
|
||||
// Create a band dataset
|
||||
await Band.create(band)
|
||||
.then(async dataset => {
|
||||
// Create the m:n associations for the genres
|
||||
for (let genreId of band.genreId) {
|
||||
await BandGenre.create({
|
||||
genreId: Number(genreId),
|
||||
for (let genre of band.genres) {
|
||||
await Genre.findOrCreate({
|
||||
where: {
|
||||
name: genre
|
||||
},
|
||||
defaults: {
|
||||
name: genre
|
||||
}
|
||||
})
|
||||
.then(async genreDataset => {
|
||||
await BandGenre.create({
|
||||
genreId: genreDataset[0].dataValues.id,
|
||||
bandId: dataset.dataValues.id
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
for (let rating of band.ratings) {
|
||||
await Account.findOne({
|
||||
where: {
|
||||
username: rating.username
|
||||
}
|
||||
})
|
||||
.then(async account => {
|
||||
await Rating.create({
|
||||
accountId: account.dataValues.id,
|
||||
rating: rating.rating,
|
||||
bandId: dataset.dataValues.id
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
for (let member of band.members) {
|
||||
await Member.create({
|
||||
name: member.name,
|
||||
image: member.image,
|
||||
bandId: dataset.dataValues.id
|
||||
})
|
||||
}
|
||||
|
||||
Rating.bulkCreate(band.ratings)
|
||||
Member.bulkCreate(band.members)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
for (let event of events.data) {
|
||||
await Event.create(event)
|
||||
.then(async dataset => {
|
||||
for (let concert of event.concerts) {
|
||||
concert["eventId"] = dataset.id
|
||||
|
||||
await Concert.create(concert)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
for (let order of orders.data) {
|
||||
await Order.create(order)
|
||||
.then(async dataset => {
|
||||
for (let ticket of order.tickets) {
|
||||
ticket["orderId"] = dataset.id
|
||||
|
||||
SeatGroup.findOne({
|
||||
where: {
|
||||
name: ticket.seatGroup
|
||||
}
|
||||
})
|
||||
.then(seatGroup => {
|
||||
SeatRow.findOne({
|
||||
where: {
|
||||
seatGroupId: seatGroup.id,
|
||||
row: ticket.seatRow
|
||||
}
|
||||
})
|
||||
.then(seatRow => {
|
||||
Seat.findOne({
|
||||
where: {
|
||||
seatRowId: seatRow.id,
|
||||
seatNr: ticket.seat
|
||||
}
|
||||
})
|
||||
.then(async seat => {
|
||||
ticket["seatId"] = seat.id
|
||||
await Ticket.create(ticket)
|
||||
})
|
||||
})
|
||||
for (let concertGroup of band.concertGroups) {
|
||||
for (let concert of concertGroup.concerts) {
|
||||
await Location.findOne({
|
||||
where: {
|
||||
name: concert.location
|
||||
}
|
||||
})
|
||||
.then(async location => {
|
||||
await Concert.create({
|
||||
date: concert.date,
|
||||
name: concertGroup.name,
|
||||
price: concert.price,
|
||||
image: concertGroup.name,
|
||||
inStock: concert.inStock,
|
||||
offered: true,
|
||||
bandId: dataset.dataValues.id,
|
||||
locationId: location.dataValues.id
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// for (let order of orders.data) {
|
||||
// await Order.create(order)
|
||||
// .then(async dataset => {
|
||||
// for (let ticket of order.tickets) {
|
||||
// ticket["orderId"] = dataset.id
|
||||
|
||||
// SeatGroup.findOne({
|
||||
// where: {
|
||||
// name: ticket.seatGroup
|
||||
// }
|
||||
// })
|
||||
// .then(seatGroup => {
|
||||
// SeatRow.findOne({
|
||||
// where: {
|
||||
// seatGroupId: seatGroup.id,
|
||||
// row: ticket.seatRow
|
||||
// }
|
||||
// })
|
||||
// .then(seatRow => {
|
||||
// Seat.findOne({
|
||||
// where: {
|
||||
// seatRowId: seatRow.id,
|
||||
// seatNr: ticket.seat
|
||||
// }
|
||||
// })
|
||||
// .then(async seat => {
|
||||
// ticket["seatId"] = seat.id
|
||||
// await Ticket.create(ticket)
|
||||
// })
|
||||
// })
|
||||
// })
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
}
|
||||
@@ -9,7 +9,6 @@ import { concert } from './routes/concert.routes'
|
||||
import { band } from './routes/band.routes'
|
||||
import { genre } from './routes/genre.routes'
|
||||
import { location } from './routes/location.routes'
|
||||
import { events } from './routes/events.routes'
|
||||
import { city } from './routes/city.routes'
|
||||
import { exercises } from './routes/exercise.routes'
|
||||
|
||||
@@ -36,7 +35,6 @@ app.use((req, res, next) => {
|
||||
|
||||
// Routes
|
||||
app.use("/api", api)
|
||||
app.use("/events", events)
|
||||
app.use("/bands", band)
|
||||
app.use("/locations", location)
|
||||
app.use("/genres", genre)
|
||||
|
||||
Reference in New Issue
Block a user