29 lines
439 B
TypeScript
29 lines
439 B
TypeScript
import { Column, HasMany, Model, Table } from "sequelize-typescript";
|
|
import { Exercise } from "./exercise.model";
|
|
|
|
@Table({ timestamps: false })
|
|
export class ExerciseGroup extends Model {
|
|
@Column
|
|
nameDe: string
|
|
|
|
@Column
|
|
nameEn: string
|
|
|
|
@Column
|
|
icon: string
|
|
|
|
@Column
|
|
groupNr: number
|
|
|
|
@Column
|
|
descriptionDe: string
|
|
|
|
@Column
|
|
descriptionEn: string
|
|
|
|
|
|
// Relations
|
|
|
|
@HasMany(() => Exercise)
|
|
exercises: Exercise[]
|
|
} |