Rewriting database and API to transform to a ticket shop

This commit is contained in:
2024-09-26 11:04:27 +02:00
parent d36dbced8e
commit da98fc73c0
88 changed files with 1040 additions and 751 deletions

View File

@@ -1,5 +1,5 @@
import { Model, BelongsTo, Column, ForeignKey, HasMany, HasOne, Table } from "sequelize-typescript";
import { Product } from "./product.model";
import { Show } from "./show.model";
import { Order } from "./order.model";
@Table({ timestamps: false })
@@ -15,7 +15,7 @@ export class OrderItem extends Model {
orderPrice: number
@Column
@ForeignKey(() => Product)
@ForeignKey(() => Show)
productId: number
@@ -23,6 +23,6 @@ export class OrderItem extends Model {
@BelongsTo(() => Order)
order: Order
@BelongsTo(() => Product)
product: Product
@BelongsTo(() => Show)
product: Show
}