import { Dictionary } from './dictionary'; import { Contact } from './contact'; import { Address } from './address'; import { Base } from './base'; export class Person extends Base { firstName?: string; middleName?: string; firstLastName?: string; secondLastName?: string; maritalStatus?: string; birthDate?: Date; taxationIdentificationNumber?: string; nationalIdentificationNumber?: string; socialSecurityNumber?: string; contactInformation?: Dictionary; addressInformation?: Dictionary
; constructor(data: any | null = null) { super(); this.firstName = ''; this.middleName = ''; this.firstLastName = ''; this.secondLastName = ''; this.maritalStatus = ''; this.birthDate = new Date(); this.taxationIdentificationNumber = ''; this.nationalIdentificationNumber = ''; this.socialSecurityNumber = ''; this.contactInformation = new Dictionary(Contact); this.addressInformation = new Dictionary
(Address); this.load(data); } get displayName(): string { const dn = this.firstName + ' '; if (this.middleName) { return (dn + this.middleName + '' + this.firstLastName + ' ' + this.secondLastName).trim(); } return (dn + this.middleName + '' + this.firstLastName + ' ' + this.secondLastName).trim(); } }