@@ -1,18 +1,12 @@
|
||||
import {
|
||||
IsInt,
|
||||
|
||||
|
||||
|
||||
IsString
|
||||
} from "class-validator";
|
||||
import { IsInt, IsString } from "class-validator";
|
||||
import { Participant } from '../entities/Participant';
|
||||
|
||||
/**
|
||||
* Defines a participant response.
|
||||
* Defines the participant response.
|
||||
*/
|
||||
export abstract class ResponseParticipant {
|
||||
/**
|
||||
* Autogenerated unique id (primary key).
|
||||
* The participant's id.
|
||||
*/
|
||||
@IsInt()
|
||||
id: number;
|
||||
@@ -25,7 +19,6 @@ export abstract class ResponseParticipant {
|
||||
|
||||
/**
|
||||
* The participant's middle name.
|
||||
* Optional.
|
||||
*/
|
||||
@IsString()
|
||||
middlename?: string;
|
||||
@@ -38,18 +31,20 @@ export abstract class ResponseParticipant {
|
||||
|
||||
/**
|
||||
* The participant's phone number.
|
||||
* Optional.
|
||||
*/
|
||||
@IsString()
|
||||
phone?: string;
|
||||
|
||||
/**
|
||||
* The participant's e-mail address.
|
||||
* Optional.
|
||||
*/
|
||||
@IsString()
|
||||
email?: string;
|
||||
|
||||
/**
|
||||
* Creates a ResponseParticipant object from a participant.
|
||||
* @param participant The participant the response shall be build for.
|
||||
*/
|
||||
public constructor(participant: Participant) {
|
||||
this.id = participant.id;
|
||||
this.firstname = participant.firstname;
|
||||
|
||||
Reference in New Issue
Block a user