New page for all concerts
This commit is contained in:
@@ -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
|
||||
}
|
||||
15
software/src/data/models/acts/bandDetailsApiModel.ts
Normal file
15
software/src/data/models/acts/bandDetailsApiModel.ts
Normal 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> = []
|
||||
}
|
||||
@@ -7,4 +7,5 @@ export class BandModel {
|
||||
images: Array<string> = []
|
||||
imageMembers: string = ""
|
||||
logo: string = ""
|
||||
rating: number = 0
|
||||
}
|
||||
@@ -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()
|
||||
}
|
||||
@@ -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
|
||||
}
|
||||
@@ -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()
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
export class EventModel {
|
||||
id: number = -1
|
||||
name: string = ""
|
||||
offered: boolean = true
|
||||
image: string = ""
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
export class RatingModel {
|
||||
id: number = -1
|
||||
rating: number = 1
|
||||
value: number = 0
|
||||
count: number = 0
|
||||
}
|
||||
@@ -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
|
||||
}
|
||||
@@ -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> = []
|
||||
}
|
||||
Reference in New Issue
Block a user