import { Entity , Column , PrimaryGeneratedColumn } from 'typeorm' ; @ Entity ( ) export class Address { @ PrimaryGeneratedColumn ( 'uuid' ) private id : string ; @ Column ( { type : 'varchar' , nullable : false } ) private street : string ; @ Column ( { type : 'varchar' , nullable : false } ) private city : string ; @ Column ( { type : 'varchar' , length : 6 , nullable : false } ) private zipCode : string ; @ Column ( { type : 'varchar' , length : 2 , nullable : false } ) private country : string ; constructor ( street , city , zipCode , country ) { this . street = street ; this . city = city ; this . zipCode = zipCode ; this . country = country ; } public getId ( ) { return this . id ; } public getStreet ( ) { return this . street ; } public getCity ( ) { return this . city ; } public getZipCode ( ) { return this . zipCode ; } public getCountry ( ) { return this . country ; } public update ( street , city , zipCode , country ) { this . street = street ; this . city = city ; this . zipCode = zipCode ; this . country = country ; } }