1
0
mirror of https://gitlab.com/comunic/comunicapiv2 synced 2024-11-22 21:39:22 +00:00
comunicapiv2/src/entities/NewSurvey.ts

26 lines
459 B
TypeScript

/**
* New survey information handler
*
* @author Pierre HUBERT
*/
export interface NewSurveyBuilder {
postID?: number,
userID: number,
question: string,
choices: Array<string>
}
export class NewSurvey implements NewSurveyBuilder {
postID: number;
userID: number;
question: string;
choices: string[];
public constructor(info: NewSurveyBuilder) {
for (const key in info) {
if (info.hasOwnProperty(key))
this[key] = info[key];
}
}
}