| Total Complexity | 4 |
| Total Lines | 35 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | import {Entity, Column, PrimaryGeneratedColumn, ManyToOne} from 'typeorm'; |
||
| 4 | |||
| 5 | @Entity() |
||
| 6 | export class PayStub { |
||
| 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 | } |
||
| 41 |