1
0
mirror of https://gitlab.com/comunic/comunicapiv2 synced 2024-11-25 23:09: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];
}
}
}