1
0
mirror of https://gitlab.com/comunic/comunicapiv2 synced 2024-11-30 01:06:28 +00:00
comunicapiv2/src/entities/SurveyResponse.ts

28 lines
491 B
TypeScript
Raw Normal View History

/**
* 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];
}
}
}