src/Domain/Task/Task.entity.ts   A
last analyzed

Complexity

Total Complexity 3
Complexity/F 1

Size

Lines of Code 27
Function Count 3

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
wmc 3
eloc 21
mnd 0
bc 0
fnc 3
dl 0
loc 27
bpm 0
cpm 1
noi 0
c 0
b 0
f 0
rs 10

3 Functions

Rating   Name   Duplication   Size   Complexity  
A Task.updateName 0 3 1
A Task.getName 0 3 1
A Task.getId 0 3 1
1
import { Entity, Column, PrimaryGeneratedColumn } from 'typeorm';
2
3
@Entity()
4
export class Task {
5
  @PrimaryGeneratedColumn('uuid')
6
  private id: string;
7
8
  @Column({ type: 'varchar', nullable: false })
9
  private name: string;
10
11
  constructor(name: string) {
12
    this.name = name;
13
  }
14
15
  public getId(): string {
16
    return this.id;
17
  }
18
19
  public getName(): string {
20
    return this.name;
21
  }
22
23
  public updateName(name: string): void {
24
    this.name = name;
25
  }
26
}
27