Updated the responseclasses to use the new address implementation
ref #105
This commit is contained in:
		| @@ -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; | ||||
|     } | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user