| Total Complexity | 3 |
| Complexity/F | 1 |
| Lines of Code | 27 |
| Function Count | 3 |
| Duplicated Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 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 |