analize
This commit is contained in:
@@ -180,6 +180,43 @@ export class Question {
|
||||
}
|
||||
}
|
||||
|
||||
export class StudyElementDB {
|
||||
"questionId": number;
|
||||
"source": string;
|
||||
"questionText": string;
|
||||
"content": string;
|
||||
"category": string;
|
||||
|
||||
/** Creates a new StudyElementDB instance. */
|
||||
constructor($$source: Partial<StudyElementDB> = {}) {
|
||||
if (!("questionId" in $$source)) {
|
||||
this["questionId"] = 0;
|
||||
}
|
||||
if (!("source" in $$source)) {
|
||||
this["source"] = "";
|
||||
}
|
||||
if (!("questionText" in $$source)) {
|
||||
this["questionText"] = "";
|
||||
}
|
||||
if (!("content" in $$source)) {
|
||||
this["content"] = "";
|
||||
}
|
||||
if (!("category" in $$source)) {
|
||||
this["category"] = "";
|
||||
}
|
||||
|
||||
Object.assign(this, $$source);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new StudyElementDB instance from a string or object.
|
||||
*/
|
||||
static createFrom($$source: any = {}): StudyElementDB {
|
||||
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
|
||||
return new StudyElementDB($$parsedSource as Partial<StudyElementDB>);
|
||||
}
|
||||
}
|
||||
|
||||
export class TargetInfo {
|
||||
"name": string;
|
||||
"count": number;
|
||||
|
||||
Reference in New Issue
Block a user