Passed
Pull Request — master (#72)
by Mathieu
02:11
created

Address   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 1
eloc 26
dl 0
loc 27
rs 10
c 0
b 0
f 0

1 Function

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