36 lines
576 B
TypeScript
36 lines
576 B
TypeScript
import { BelongsTo, Column, ForeignKey, Model, Table } from "sequelize-typescript";
|
|
import { ExerciseGroup } from "./exerciseGroup.model";
|
|
|
|
@Table({ timestamps: false })
|
|
export class Exercise extends Model {
|
|
@Column
|
|
uuid: string
|
|
|
|
@Column
|
|
nameDe: string
|
|
|
|
@Column
|
|
nameEn: string
|
|
|
|
@Column
|
|
exerciseNr: number
|
|
|
|
@Column
|
|
descriptionDe: string
|
|
|
|
@Column
|
|
descriptionEn: string
|
|
|
|
@Column
|
|
solved: boolean
|
|
|
|
@ForeignKey(() => ExerciseGroup)
|
|
@Column
|
|
exerciseGroupId: number
|
|
|
|
|
|
// Relations
|
|
|
|
@BelongsTo(() => ExerciseGroup)
|
|
exerciseGroup: ExerciseGroup
|
|
} |