mirror of
https://gitlab.com/comunic/comunicapiv2
synced 2024-11-30 01:06:28 +00:00
28 lines
491 B
TypeScript
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];
|
||
|
}
|
||
|
}
|
||
|
}
|