Total Complexity | 4 |
Complexity/F | 1 |
Lines of Code | 41 |
Function Count | 4 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | import {Entity, Column, PrimaryGeneratedColumn, ManyToOne} from 'typeorm'; |
||
2 | import {User} from '../User/User.entity'; |
||
3 | import {File} from 'src/Domain/File/File.entity'; |
||
4 | |||
5 | @Entity() |
||
6 | export class PaySlip { |
||
7 | @PrimaryGeneratedColumn('uuid') |
||
8 | private id: string; |
||
9 | |||
10 | @Column({type: 'timestamp', nullable: false}) |
||
11 | private date: string; |
||
12 | |||
13 | @ManyToOne(type => File, {nullable: false}) |
||
14 | private file: File; |
||
15 | |||
16 | @ManyToOne(type => User, {nullable: false}) |
||
17 | private user: User; |
||
18 | |||
19 | constructor(date: string, file: File, user: User) { |
||
20 | this.date = date; |
||
21 | this.file = file; |
||
22 | this.user = user; |
||
23 | } |
||
24 | |||
25 | public getId(): string { |
||
26 | return this.id; |
||
27 | } |
||
28 | |||
29 | public getFile(): File { |
||
30 | return this.file; |
||
31 | } |
||
32 | |||
33 | public getDate(): string { |
||
34 | return this.date; |
||
35 | } |
||
36 | |||
37 | public getUser(): User { |
||
38 | return this.user; |
||
39 | } |
||
40 | } |
||
41 |