import { Entity , Column , PrimaryGeneratedColumn } from 'typeorm' ; @ Entity ( ) export class Contact { @ PrimaryGeneratedColumn ( 'uuid' ) private id : string ; @ Column ( { type : 'timestamp' , default : ( ) => 'CURRENT_TIMESTAMP' } ) private createdAt : Date ; @ Column ( { type : 'varchar' , nullable : true } ) private firstName : string ; @ Column ( { type : 'varchar' , nullable : true } ) private lastName : string ; @ Column ( { type : 'varchar' , nullable : true } ) private company : string ; @ Column ( { type : 'varchar' , nullable : true } ) private email : string ; @ Column ( { type : 'varchar' , nullable : true } ) private phoneNumber : string ; @ Column ( { type : 'varchar' , nullable : true } ) private notes : string ; constructor ( firstName , lastName , company , email , phoneNumber , notes ) { this . firstName = firstName ; this . lastName = lastName ; this . company = company ; this . email = email ; this . phoneNumber = phoneNumber ; this . notes = notes ; } public getId ( ) { return this . id ; } public getCreatedAt ( ) { return this . createdAt ; } public getFirstName ( ) { return this . firstName ; } public getLastName ( ) { return this . lastName ; } public getCompany ( ) { return this . company ; } public getEmail ( ) { return this . email ; } public getPhoneNumber ( ) { return this . phoneNumber ; } public getNotes ( ) { return this . notes ; } public update ( firstName , lastName , company , email , phoneNumber , notes ) { this . firstName = firstName ; this . lastName = lastName ; this . company = company ; this . email = email ; this . phoneNumber = phoneNumber ; this . notes = notes ; } }