Files
eventmaster/software/backend/models/acts/rating.model.ts
2024-10-12 19:40:12 +02:00

27 lines
488 B
TypeScript

import { BelongsTo, Column, ForeignKey, Model, Table } from "sequelize-typescript";
import { Account } from "../user/account.model";
import { Band } from "./band.model";
@Table({ timestamps: false })
export class Rating extends Model {
@ForeignKey(() => Account)
@Column
accountId: number
@Column
rating: number
@ForeignKey(() => Band)
@Column
bandId: number
// Relations
@BelongsTo(() => Account)
account: Account
@BelongsTo(() => Band)
band: Band
}