Ticket Component
This commit is contained in:
@@ -23,11 +23,13 @@
|
||||
"tickets": [
|
||||
{
|
||||
"concertId": 0,
|
||||
"orderPrice": 184
|
||||
"orderPrice": 184,
|
||||
"seatId": 2
|
||||
},
|
||||
{
|
||||
"concertId": 0,
|
||||
"orderPrice": 184
|
||||
"orderPrice": 184,
|
||||
"seatId": 3
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -40,7 +42,8 @@
|
||||
"tickets": [
|
||||
{
|
||||
"concertId": 0,
|
||||
"orderPrice": 184
|
||||
"orderPrice": 184,
|
||||
"seatId": 3
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ export class Ticket extends Model {
|
||||
order: Order
|
||||
|
||||
@BelongsTo(() => Concert)
|
||||
product: Concert
|
||||
concert: Concert
|
||||
|
||||
@BelongsTo(() => Seat)
|
||||
seat: Seat
|
||||
|
||||
@@ -7,6 +7,10 @@ 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";
|
||||
import { SeatGroup } from "../models/locations/seatGroup.model";
|
||||
|
||||
export const order = Router()
|
||||
|
||||
@@ -25,7 +29,10 @@ order.get("/:id", (req: Request, res: Response) => {
|
||||
model: Event,
|
||||
include: [ Band ]
|
||||
},
|
||||
Location
|
||||
{
|
||||
model: Location,
|
||||
include: [ City ]
|
||||
}
|
||||
],
|
||||
attributes: {
|
||||
exclude: [
|
||||
@@ -34,6 +41,15 @@ order.get("/:id", (req: Request, res: Response) => {
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
model: Seat,
|
||||
include: [
|
||||
{
|
||||
model: SeatRow,
|
||||
include: [ SeatGroup ]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
Payment,
|
||||
|
||||
Reference in New Issue
Block a user