Passed
Pull Request — master (#182)
by
unknown
01:48
created

MealTicketRemoval.getId   A

Complexity

Conditions 1

Size

Total Lines 3
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
import { Entity, Column, PrimaryGeneratedColumn, ManyToOne } from 'typeorm';
2
import { User } from '../User/User.entity';
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
  }
39
}
40