Display concerts with card views on "All concerts" page, adding image property for tours
This commit is contained in:
@@ -4,7 +4,7 @@ import { Tour } from "./tour.model";
|
||||
import { OrderItem } from "../ordering/orderItem.model";
|
||||
|
||||
@Table({ timestamps: false })
|
||||
export class Show extends Model {
|
||||
export class Concert extends Model {
|
||||
@Column
|
||||
date: String
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { BelongsTo, Column, ForeignKey, HasMany, Model, Table } from "sequelize-typescript";
|
||||
import { Show } from "./show.model";
|
||||
import { Concert } from "./concert.model";
|
||||
import { City } from "./city.model";
|
||||
|
||||
@Table({ timestamps: false })
|
||||
@@ -20,8 +20,8 @@ export class Location extends Model {
|
||||
|
||||
// Relations
|
||||
|
||||
@HasMany(() => Show)
|
||||
shows: Show[]
|
||||
@HasMany(() => Concert)
|
||||
shows: Concert[]
|
||||
|
||||
@BelongsTo(() => City)
|
||||
city: City
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { BelongsTo, Column, ForeignKey, HasMany, Model, Table } from "sequelize-typescript";
|
||||
import { Band } from "./band.model";
|
||||
import { Show } from "./show.model";
|
||||
import { Concert } from "./concert.model";
|
||||
|
||||
@Table({ timestamps: false })
|
||||
export class Tour extends Model {
|
||||
@@ -13,12 +13,15 @@ export class Tour extends Model {
|
||||
@Column
|
||||
offered: Boolean
|
||||
|
||||
@Column
|
||||
image: String
|
||||
|
||||
|
||||
// Relations
|
||||
|
||||
@BelongsTo(() => Band)
|
||||
band: Band
|
||||
|
||||
@HasMany(() => Show)
|
||||
shows: Show[]
|
||||
@HasMany(() => Concert)
|
||||
shows: Concert[]
|
||||
}
|
||||
Reference in New Issue
Block a user