1
0
mirror of https://gitlab.com/comunic/comunicapiv2 synced 2024-11-26 07:19:23 +00:00
comunicapiv2/src/entities/SurveyResponse.ts

28 lines
491 B
TypeScript

/**
* Response to a survey
*
* @author Pierre HUBERT
*/
export interface SurveyResponseBuilder {
id: number,
timeSent: number,
userID: number,
surveyID: number,
choiceID: number
}
export class SurveyResponse implements SurveyResponseBuilder {
id: number;
timeSent: number;
userID: number;
surveyID: number;
choiceID: number;
public constructor(info: SurveyResponseBuilder) {
for (const key in info) {
if (info.hasOwnProperty(key))
this[key] = info[key];
}
}
}