You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
513 B
TypeScript

import { Entity, PrimaryGeneratedColumn, Column, ManyToMany } from 'typeorm';
import { Participant } from './Participant';
@Entity()
export class Workshop {
@PrimaryGeneratedColumn()
id: number;
@Column()
type: string;
@Column()
title: string;
@Column()
description: string;
@Column({
type: 'date'
})
date: Date;
@ManyToMany(type => Participant, participant => participant.workshops, {
nullable: true
})
participants: Participant[];
}