Updated the responseclasses to use the new address implementation
ref #105
This commit is contained in:
parent
e2651728c5
commit
dafac06bc8
@ -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';
|
import { Participant } from '../entities/Participant';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -41,6 +42,13 @@ export abstract class ResponseParticipant {
|
|||||||
@IsString()
|
@IsString()
|
||||||
email?: string;
|
email?: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The participant's address.
|
||||||
|
*/
|
||||||
|
@IsOptional()
|
||||||
|
@IsObject()
|
||||||
|
address?: Address;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a ResponseParticipant object from a participant.
|
* Creates a ResponseParticipant object from a participant.
|
||||||
* @param participant The participant the response shall be build for.
|
* @param participant The participant the response shall be build for.
|
||||||
@ -52,5 +60,6 @@ export abstract class ResponseParticipant {
|
|||||||
this.lastname = participant.lastname;
|
this.lastname = participant.lastname;
|
||||||
this.phone = participant.phone;
|
this.phone = participant.phone;
|
||||||
this.email = participant.email;
|
this.email = participant.email;
|
||||||
|
this.address = participant.address;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user