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.
22 lines
439 B
TypeScript
22 lines
439 B
TypeScript
4 years ago
|
import { Entity, PrimaryGeneratedColumn, Column, ManyToMany } from 'typeorm';
|
||
|
import { Participant } from './Participant';
|
||
|
|
||
|
@Entity()
|
||
|
export class Workshop {
|
||
|
@PrimaryGeneratedColumn()
|
||
|
id: number;
|
||
|
|
||
|
@Column()
|
||
|
name: string;
|
||
|
|
||
|
@Column({
|
||
|
type: 'date'
|
||
|
})
|
||
|
date: Date;
|
||
|
|
||
|
@ManyToMany(type => Participant, participant => participant.workshops, {
|
||
|
nullable: true
|
||
|
})
|
||
|
participants: Participant[];
|
||
|
}
|