Adding Seat plan component and database tables
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { LocationModel } from "./locationModel"
|
||||
import { LocationModel } from "./../locations/locationModel"
|
||||
|
||||
export class ConcertModel {
|
||||
id: number
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import { SeatGroupModel } from "./seatGroupModel"
|
||||
|
||||
/**
|
||||
* Replica of the API endpoint /locations
|
||||
*/
|
||||
@@ -6,6 +8,7 @@ export class LocationModel {
|
||||
name: string
|
||||
address: string
|
||||
image: string
|
||||
seatSchema: string
|
||||
city: {
|
||||
name: string
|
||||
country: string
|
||||
@@ -22,4 +25,5 @@ export class LocationModel {
|
||||
bandName: string
|
||||
}
|
||||
}>
|
||||
seatGroups: Array<SeatGroupModel>
|
||||
}
|
||||
9
software/src/data/models/locations/seatGroupModel.ts
Normal file
9
software/src/data/models/locations/seatGroupModel.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import { SeatRowModel } from "./seatRowModel"
|
||||
|
||||
export class SeatGroupModel {
|
||||
name: string
|
||||
surcharge: number
|
||||
standingArea: Boolean
|
||||
capacity: number
|
||||
seatRows: Array<SeatRowModel>
|
||||
}
|
||||
4
software/src/data/models/locations/seatModel.ts
Normal file
4
software/src/data/models/locations/seatModel.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
export class SeatModel {
|
||||
id: number
|
||||
seatNr: string
|
||||
}
|
||||
6
software/src/data/models/locations/seatRowModel.ts
Normal file
6
software/src/data/models/locations/seatRowModel.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
import { SeatModel } from "./seatModel"
|
||||
|
||||
export class SeatRowModel {
|
||||
row: number
|
||||
seats: Array<SeatModel>
|
||||
}
|
||||
@@ -5,10 +5,10 @@ import { getAllTours } from "../api/tourApi";
|
||||
import { GenreModel } from "../models/acts/genreModel";
|
||||
import { getAllBands } from "../api/bandApi";
|
||||
import { BandModel } from "../models/acts/bandModel";
|
||||
import { LocationModel } from "../models/acts/locationModel";
|
||||
import { LocationModel } from "../models/locations/locationModel";
|
||||
import { getAllLocations } from "../api/locationApi";
|
||||
import { getAllGenres } from "../api/genreApi";
|
||||
import { CityModel } from "../models/acts/cityModel";
|
||||
import { CityModel } from "../models/locations/cityModel";
|
||||
import { getAllCities } from "../api/cityApi";
|
||||
|
||||
export const useConcertStore = defineStore("concertStore", {
|
||||
@@ -47,6 +47,7 @@ export const useConcertStore = defineStore("concertStore", {
|
||||
|
||||
await getAllLocations()
|
||||
.then(result => {
|
||||
console.log(result.data)
|
||||
this.locations = result.data
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user