| Total Complexity | 3 |
| Total Lines | 27 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | import { |
||
| 8 | |||
| 9 | @Entity() |
||
| 10 | export class Classroom { |
||
| 11 | @PrimaryGeneratedColumn('uuid') |
||
| 12 | private id: string; |
||
| 13 | |||
| 14 | @Column({ type: 'varchar', nullable: false }) |
||
| 15 | private name: string; |
||
| 16 | |||
| 17 | @ManyToOne(() => Shooting, { nullable: false, onDelete: 'CASCADE' }) |
||
| 18 | private shooting: Shooting; |
||
| 19 | |||
| 20 | constructor(name: string, shooting: Shooting) { |
||
| 21 | this.name = name; |
||
| 22 | this.shooting = shooting; |
||
| 23 | } |
||
| 24 | |||
| 25 | public getId(): string { |
||
| 26 | return this.id; |
||
| 27 | } |
||
| 28 | |||
| 29 | public getName(): string { |
||
| 30 | return this.name; |
||
| 31 | } |
||
| 32 | |||
| 33 | public getShooting(): Shooting { |
||
| 34 | return this.shooting; |
||
| 35 | } |
||
| 37 |