203 lines
5.7 KiB
TypeScript
203 lines
5.7 KiB
TypeScript
|
|
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
||
|
|
// This file is automatically generated. DO NOT EDIT
|
||
|
|
|
||
|
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||
|
|
// @ts-ignore: Unused imports
|
||
|
|
import { Create as $Create } from "@wailsio/runtime";
|
||
|
|
|
||
|
|
export class CategoryInfo {
|
||
|
|
"name": string;
|
||
|
|
"count": number;
|
||
|
|
|
||
|
|
/** Creates a new CategoryInfo instance. */
|
||
|
|
constructor($$source: Partial<CategoryInfo> = {}) {
|
||
|
|
if (!("name" in $$source)) {
|
||
|
|
this["name"] = "";
|
||
|
|
}
|
||
|
|
if (!("count" in $$source)) {
|
||
|
|
this["count"] = 0;
|
||
|
|
}
|
||
|
|
|
||
|
|
Object.assign(this, $$source);
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Creates a new CategoryInfo instance from a string or object.
|
||
|
|
*/
|
||
|
|
static createFrom($$source: any = {}): CategoryInfo {
|
||
|
|
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
|
||
|
|
return new CategoryInfo($$parsedSource as Partial<CategoryInfo>);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
export class DescriptiveGradingRecord {
|
||
|
|
"id": number;
|
||
|
|
"questionId": number;
|
||
|
|
"source": string;
|
||
|
|
"userAnswer": string;
|
||
|
|
"score": number;
|
||
|
|
"evaluation": string;
|
||
|
|
"username": string;
|
||
|
|
"createdAt": string;
|
||
|
|
|
||
|
|
/** Creates a new DescriptiveGradingRecord instance. */
|
||
|
|
constructor($$source: Partial<DescriptiveGradingRecord> = {}) {
|
||
|
|
if (!("id" in $$source)) {
|
||
|
|
this["id"] = 0;
|
||
|
|
}
|
||
|
|
if (!("questionId" in $$source)) {
|
||
|
|
this["questionId"] = 0;
|
||
|
|
}
|
||
|
|
if (!("source" in $$source)) {
|
||
|
|
this["source"] = "";
|
||
|
|
}
|
||
|
|
if (!("userAnswer" in $$source)) {
|
||
|
|
this["userAnswer"] = "";
|
||
|
|
}
|
||
|
|
if (!("score" in $$source)) {
|
||
|
|
this["score"] = 0;
|
||
|
|
}
|
||
|
|
if (!("evaluation" in $$source)) {
|
||
|
|
this["evaluation"] = "";
|
||
|
|
}
|
||
|
|
if (!("username" in $$source)) {
|
||
|
|
this["username"] = "";
|
||
|
|
}
|
||
|
|
if (!("createdAt" in $$source)) {
|
||
|
|
this["createdAt"] = "";
|
||
|
|
}
|
||
|
|
|
||
|
|
Object.assign(this, $$source);
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Creates a new DescriptiveGradingRecord instance from a string or object.
|
||
|
|
*/
|
||
|
|
static createFrom($$source: any = {}): DescriptiveGradingRecord {
|
||
|
|
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
|
||
|
|
return new DescriptiveGradingRecord($$parsedSource as Partial<DescriptiveGradingRecord>);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
export class Question {
|
||
|
|
"id": number;
|
||
|
|
"source": string;
|
||
|
|
"category": string;
|
||
|
|
"questionText": string;
|
||
|
|
"choice1": string;
|
||
|
|
"choice2": string;
|
||
|
|
"choice3": string;
|
||
|
|
"choice4": string;
|
||
|
|
"choice5": string;
|
||
|
|
"correctAnswer": number;
|
||
|
|
"correctAnswerStr": string;
|
||
|
|
"explanation": string;
|
||
|
|
"difficulty": string;
|
||
|
|
"passage": string;
|
||
|
|
"imageUrl": string;
|
||
|
|
"geminiExplanation": string;
|
||
|
|
"isBookmarked": boolean;
|
||
|
|
"subject": string;
|
||
|
|
"correctAnswers": string;
|
||
|
|
"oid": number;
|
||
|
|
|
||
|
|
/** Creates a new Question instance. */
|
||
|
|
constructor($$source: Partial<Question> = {}) {
|
||
|
|
if (!("id" in $$source)) {
|
||
|
|
this["id"] = 0;
|
||
|
|
}
|
||
|
|
if (!("source" in $$source)) {
|
||
|
|
this["source"] = "";
|
||
|
|
}
|
||
|
|
if (!("category" in $$source)) {
|
||
|
|
this["category"] = "";
|
||
|
|
}
|
||
|
|
if (!("questionText" in $$source)) {
|
||
|
|
this["questionText"] = "";
|
||
|
|
}
|
||
|
|
if (!("choice1" in $$source)) {
|
||
|
|
this["choice1"] = "";
|
||
|
|
}
|
||
|
|
if (!("choice2" in $$source)) {
|
||
|
|
this["choice2"] = "";
|
||
|
|
}
|
||
|
|
if (!("choice3" in $$source)) {
|
||
|
|
this["choice3"] = "";
|
||
|
|
}
|
||
|
|
if (!("choice4" in $$source)) {
|
||
|
|
this["choice4"] = "";
|
||
|
|
}
|
||
|
|
if (!("choice5" in $$source)) {
|
||
|
|
this["choice5"] = "";
|
||
|
|
}
|
||
|
|
if (!("correctAnswer" in $$source)) {
|
||
|
|
this["correctAnswer"] = 0;
|
||
|
|
}
|
||
|
|
if (!("correctAnswerStr" in $$source)) {
|
||
|
|
this["correctAnswerStr"] = "";
|
||
|
|
}
|
||
|
|
if (!("explanation" in $$source)) {
|
||
|
|
this["explanation"] = "";
|
||
|
|
}
|
||
|
|
if (!("difficulty" in $$source)) {
|
||
|
|
this["difficulty"] = "";
|
||
|
|
}
|
||
|
|
if (!("passage" in $$source)) {
|
||
|
|
this["passage"] = "";
|
||
|
|
}
|
||
|
|
if (!("imageUrl" in $$source)) {
|
||
|
|
this["imageUrl"] = "";
|
||
|
|
}
|
||
|
|
if (!("geminiExplanation" in $$source)) {
|
||
|
|
this["geminiExplanation"] = "";
|
||
|
|
}
|
||
|
|
if (!("isBookmarked" in $$source)) {
|
||
|
|
this["isBookmarked"] = false;
|
||
|
|
}
|
||
|
|
if (!("subject" in $$source)) {
|
||
|
|
this["subject"] = "";
|
||
|
|
}
|
||
|
|
if (!("correctAnswers" in $$source)) {
|
||
|
|
this["correctAnswers"] = "";
|
||
|
|
}
|
||
|
|
if (!("oid" in $$source)) {
|
||
|
|
this["oid"] = 0;
|
||
|
|
}
|
||
|
|
|
||
|
|
Object.assign(this, $$source);
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Creates a new Question instance from a string or object.
|
||
|
|
*/
|
||
|
|
static createFrom($$source: any = {}): Question {
|
||
|
|
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
|
||
|
|
return new Question($$parsedSource as Partial<Question>);
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
export class TargetInfo {
|
||
|
|
"name": string;
|
||
|
|
"count": number;
|
||
|
|
|
||
|
|
/** Creates a new TargetInfo instance. */
|
||
|
|
constructor($$source: Partial<TargetInfo> = {}) {
|
||
|
|
if (!("name" in $$source)) {
|
||
|
|
this["name"] = "";
|
||
|
|
}
|
||
|
|
if (!("count" in $$source)) {
|
||
|
|
this["count"] = 0;
|
||
|
|
}
|
||
|
|
|
||
|
|
Object.assign(this, $$source);
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Creates a new TargetInfo instance from a string or object.
|
||
|
|
*/
|
||
|
|
static createFrom($$source: any = {}): TargetInfo {
|
||
|
|
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
|
||
|
|
return new TargetInfo($$parsedSource as Partial<TargetInfo>);
|
||
|
|
}
|
||
|
|
}
|