Remove EventTable in database, redesign frontend URL paths

This commit is contained in:
2024-10-12 15:54:03 +02:00
parent 1d4daac9ae
commit 203f8428a7
40 changed files with 955 additions and 1203 deletions

View File

@@ -1,33 +1,39 @@
import { BelongsTo, Column, ForeignKey, HasMany, Model, Table } from "sequelize-typescript";
import { Location } from "./../locations/location.model";
import { Event } from "./event.model";
import { Ticket } from "../ordering/ticket.model";
import { Band } from "./band.model";
@Table({ timestamps: false })
export class Concert extends Model {
@Column
date: String
@Column
name: String
@Column
price: Number
@Column
image: String
@Column
inStock: Number
@Column
offered: Boolean
@ForeignKey(() => Band)
@Column
bandId: Number
@ForeignKey(() => Location)
@Column
locationId: Number
@ForeignKey(() => Event)
@Column
eventId: Number
// Relations
@BelongsTo(() => Event)
event: Event
@BelongsTo(() => Location)
location: Location