Files
2026-07-05 08:45:54 +00:00

301 lines
8.3 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;
"ocrImageUrl": 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"] = "";
}
if (!("ocrImageUrl" in $$source)) {
this["ocrImageUrl"] = "";
}
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 StudyElementDB {
"questionId": number;
"source": string;
"questionText": string;
"content": string;
"keyword": 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 (!("keyword" in $$source)) {
this["keyword"] = "";
}
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;
/** 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>);
}
}
export class User {
"id": number;
"username": string;
"password": string;
"nickname": string;
"phone": string;
/**
* 'pending', 'approved', 'rejected'
*/
"status": string;
"apiKey": string;
"createdAt": string;
/** Creates a new User instance. */
constructor($$source: Partial<User> = {}) {
if (!("id" in $$source)) {
this["id"] = 0;
}
if (!("username" in $$source)) {
this["username"] = "";
}
if (!("password" in $$source)) {
this["password"] = "";
}
if (!("nickname" in $$source)) {
this["nickname"] = "";
}
if (!("phone" in $$source)) {
this["phone"] = "";
}
if (!("status" in $$source)) {
this["status"] = "";
}
if (!("apiKey" in $$source)) {
this["apiKey"] = "";
}
if (!("createdAt" in $$source)) {
this["createdAt"] = "";
}
Object.assign(this, $$source);
}
/**
* Creates a new User instance from a string or object.
*/
static createFrom($$source: any = {}): User {
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
return new User($$parsedSource as Partial<User>);
}
}