Total Complexity | 4 |
Total Lines | 35 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | import { Entity, Column, PrimaryGeneratedColumn, ManyToOne } from 'typeorm'; |
||
3 | |||
4 | @Entity() |
||
5 | export class MealTicketRemoval { |
||
6 | @PrimaryGeneratedColumn('uuid') |
||
7 | private id: string; |
||
8 | |||
9 | @Column({ type: 'timestamp', nullable: false }) |
||
10 | private date: string; |
||
11 | |||
12 | @Column({ type: 'varchar', nullable: false }) |
||
13 | private comment: string; |
||
14 | |||
15 | @ManyToOne(type => User, { nullable: false, onDelete: 'CASCADE' }) |
||
16 | private user: User; |
||
17 | |||
18 | constructor(date: string, comment: string, user: User) { |
||
19 | this.date = date; |
||
20 | this.comment = comment; |
||
21 | this.user = user; |
||
22 | } |
||
23 | |||
24 | public getId(): string { |
||
25 | return this.id; |
||
26 | } |
||
27 | |||
28 | public getDate(): string { |
||
29 | return this.date; |
||
30 | } |
||
31 | |||
32 | public getComment(): string { |
||
33 | return this.comment; |
||
34 | } |
||
35 | |||
36 | public getUser(): User { |
||
37 | return this.user; |
||
38 | } |
||
40 |