Passed
Pull Request — master (#257)
by Mathieu
02:28
created

InterestRate.getId   A

Complexity

Conditions 1

Size

Total Lines 3
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 3
dl 0
loc 3
c 0
b 0
f 0
rs 10
cc 1
1
import {
2
  Entity,
3
  Column,
4
  PrimaryGeneratedColumn,
5
} from 'typeorm';
6
7
@Entity()
8
export class InterestRate {
9
  @PrimaryGeneratedColumn('uuid')
10
  private id: string;
11
12
  @Column({ type: 'integer', nullable: false, comment: 'Stored in base 100' })
13
  private rate: number;
14
15
  @Column({ type: 'timestamp', default: () => 'CURRENT_TIMESTAMP' })
16
  private createdAt: Date;
17
18
  constructor(rate: number) {
19
    this.rate = rate;
20
  }
21
22
  public getId(): string {
23
    return this.id;
24
  }
25
26
  public getRate(): number {
27
    return this.rate;
28
  }
29
}
30