diff --git a/src/models/responses/ResponseGroupContact.ts b/src/models/responses/ResponseGroupContact.ts index f7e63b3..d7ac6f2 100644 --- a/src/models/responses/ResponseGroupContact.ts +++ b/src/models/responses/ResponseGroupContact.ts @@ -1,4 +1,5 @@ -import { IsInt, IsString } from "class-validator"; +import { IsInt, IsObject, IsString } from "class-validator"; +import { Address } from '../entities/Address'; import { GroupContact } from '../entities/GroupContact'; import { ResponseRunnerGroup } from './ResponseRunnerGroup'; @@ -45,9 +46,15 @@ export class ResponseGroupContact { /** * The contact's associated runner groups. */ + @IsObject() groups: ResponseRunnerGroup[]; - //TODO: Address + /** + * The contact's address. + * This is a address object to prevent any formatting differences. + */ + @IsObject() + address?: Address; /** * Creates a ResponseGroupContact object from a contact. @@ -60,6 +67,7 @@ export class ResponseGroupContact { this.lastname = contact.lastname; this.phone = contact.phone; this.email = contact.email; + this.address = contact.address; for (let group of contact.groups) { this.groups.push(group.toResponse()); }