Display concerts with card views on "All concerts" page, adding image property for tours

This commit is contained in:
2024-09-28 21:18:25 +02:00
parent 8d0b141217
commit 0616409f14
49 changed files with 454 additions and 219 deletions

View File

@@ -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[]
}