Fully implemented addresses feature/105-addresses #107

Manually merged
niggl merged 23 commits from feature/105-addresses into dev 2021-01-19 15:37:37 +00:00
Showing only changes of commit dafac06bc8 - Show all commits

View File

@ -1,4 +1,5 @@
import { IsInt, IsString } from "class-validator";
import { IsInt, IsObject, IsOptional, IsString } from "class-validator";
import { Address } from '../entities/Address';
import { Participant } from '../entities/Participant';
/**
@ -41,6 +42,13 @@ export abstract class ResponseParticipant {
@IsString()
email?: string;
/**
* The participant's address.
*/
@IsOptional()
@IsObject()
address?: Address;
/**
* Creates a ResponseParticipant object from a participant.
* @param participant The participant the response shall be build for.
@ -52,5 +60,6 @@ export abstract class ResponseParticipant {
this.lastname = participant.lastname;
this.phone = participant.phone;
this.email = participant.email;
this.address = participant.address;
}
}