Remove EventTable in database, redesign frontend URL paths
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user