New page for all concerts

This commit is contained in:
2024-10-12 19:40:12 +02:00
parent f8bdb54c33
commit 6c33de3d87
56 changed files with 531 additions and 405 deletions

View File

@@ -1,12 +1,11 @@
import { BandModel } from "./bandModel";
import { EventApiModel } from "./eventApiModel";
import { GenreModel } from "./genreModel"
import { MemberModel } from "./memberModel"
import { RatingModel } from "./ratingModel"
/**
* Replica of the API endpoint /bands
*/
export class BandApiModel extends BandModel {
ratings: Array<RatingModel> = []
members: Array<MemberModel> = []
genres: Array<GenreModel> = []
events: Array<EventApiModel> = []
rating: number = 0
nrOfConcerts: number = 0
}

View File

@@ -0,0 +1,15 @@
import { BandModel } from "./bandModel";
import { ConcertApiModel } from "./concertApiModel";
import { GenreModel } from "./genreModel"
import { MemberModel } from "./memberModel";
import { RatingModel } from "./ratingModel"
/**
* Replica of the API endpoint /bands/band/:name
*/
export class BandDetailsApiModel extends BandModel {
members: Array<MemberModel> = []
ratingValues: Array<RatingModel> = []
genres: Array<GenreModel> = []
concerts: Array<ConcertApiModel> = []
}

View File

@@ -7,4 +7,5 @@ export class BandModel {
images: Array<string> = []
imageMembers: string = ""
logo: string = ""
rating: number = 0
}

View File

@@ -1,8 +1,8 @@
import { LocationApiModel } from "../locations/locationApiModel"
import { BandModel } from "./bandModel"
import { ConcertModel } from "./concertModel"
import { EventApiModel } from "./eventApiModel"
export class ConcertApiModel extends ConcertModel {
location: LocationApiModel = new LocationApiModel()
event: EventApiModel = new EventApiModel()
band: BandModel = new BandModel()
}

View File

@@ -1,6 +1,9 @@
export class ConcertModel {
id: number = -1
inStock: number = 0
date: string = ""
name: string = ""
price: number = 0
image: string = ""
inStock: number = 0
offered: boolean = true
}

View File

@@ -1,8 +0,0 @@
import { EventModel } from "./eventModel";
import { BandModel } from "./bandModel"
import { ConcertApiModel } from "./concertApiModel";
export class EventApiModel extends EventModel {
concerts: Array<ConcertApiModel> = []
band: BandModel = new BandModel()
}

View File

@@ -1,6 +0,0 @@
export class EventModel {
id: number = -1
name: string = ""
offered: boolean = true
image: string = ""
}

View File

@@ -1,4 +1,4 @@
export class RatingModel {
id: number = -1
rating: number = 1
value: number = 0
count: number = 0
}

View File

@@ -1,13 +1,10 @@
import { ConcertApiModel } from "../acts/concertApiModel"
import { CityModel } from "./cityModel"
import { LocationModel } from "./locationModel"
import { SeatGroupModel } from "./seatGroupModel"
/**
* Replica of the API endpoint /locations
*/
export class LocationApiModel extends LocationModel {
city: CityModel = new CityModel()
concerts: Array<ConcertApiModel> = []
seatGroups: Array<SeatGroupModel> = []
nrOfConcerts: number = 0
}

View File

@@ -0,0 +1,13 @@
import { ConcertApiModel } from "../acts/concertApiModel"
import { CityModel } from "./cityModel"
import { LocationModel } from "./locationModel"
import { SeatGroupModel } from "./seatGroupModel"
/**
* Replica of the API endpoint /locations/location/:name
*/
export class LocationDetailsApiModel extends LocationModel {
city: CityModel = new CityModel()
concerts: Array<ConcertApiModel> = []
seatGroups: Array<SeatGroupModel> = []
}