// 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"; // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore: Unused imports import * as time$0 from "../../../time/models.js"; /** * AppConfig 应用配置 - 包含业务配置和路径配置 */ export class AppConfig { /** * 编辑器配置 */ "editor": EditorConfig; /** * 路径配置 */ "paths": PathsConfig; /** * 配置元数据 */ "metadata": ConfigMetadata; /** Creates a new AppConfig instance. */ constructor($$source: Partial = {}) { if (!("editor" in $$source)) { this["editor"] = (new EditorConfig()); } if (!("paths" in $$source)) { this["paths"] = (new PathsConfig()); } if (!("metadata" in $$source)) { this["metadata"] = (new ConfigMetadata()); } Object.assign(this, $$source); } /** * Creates a new AppConfig instance from a string or object. */ static createFrom($$source: any = {}): AppConfig { const $$createField0_0 = $$createType0; const $$createField1_0 = $$createType1; const $$createField2_0 = $$createType2; let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source; if ("editor" in $$parsedSource) { $$parsedSource["editor"] = $$createField0_0($$parsedSource["editor"]); } if ("paths" in $$parsedSource) { $$parsedSource["paths"] = $$createField1_0($$parsedSource["paths"]); } if ("metadata" in $$parsedSource) { $$parsedSource["metadata"] = $$createField2_0($$parsedSource["metadata"]); } return new AppConfig($$parsedSource as Partial); } } /** * ConfigMetadata 配置元数据 */ export class ConfigMetadata { /** * 配置版本 */ "version": string; /** * 最后更新时间 */ "lastUpdated": time$0.Time; /** Creates a new ConfigMetadata instance. */ constructor($$source: Partial = {}) { if (!("version" in $$source)) { this["version"] = ""; } if (!("lastUpdated" in $$source)) { this["lastUpdated"] = null; } Object.assign(this, $$source); } /** * Creates a new ConfigMetadata instance from a string or object. */ static createFrom($$source: any = {}): ConfigMetadata { let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source; return new ConfigMetadata($$parsedSource as Partial); } } /** * EditorConfig 定义编辑器配置 */ export class EditorConfig { /** * 字体大小 */ "fontSize": number; /** * 是否启用Tab缩进 */ "enableTabIndent": boolean; /** * Tab大小 */ "tabSize": number; /** * Tab类型(空格或Tab) */ "tabType": TabType; /** * 界面语言 */ "language": LanguageType; /** Creates a new EditorConfig instance. */ constructor($$source: Partial = {}) { if (!("fontSize" in $$source)) { this["fontSize"] = 0; } if (!("enableTabIndent" in $$source)) { this["enableTabIndent"] = false; } if (!("tabSize" in $$source)) { this["tabSize"] = 0; } if (!("tabType" in $$source)) { this["tabType"] = ("" as TabType); } if (!("language" in $$source)) { this["language"] = ("" as LanguageType); } Object.assign(this, $$source); } /** * Creates a new EditorConfig instance from a string or object. */ static createFrom($$source: any = {}): EditorConfig { let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source; return new EditorConfig($$parsedSource as Partial); } } /** * LanguageType 语言类型定义 */ export enum LanguageType { /** * The Go zero value for the underlying type of the enum. */ $zero = "", /** * LangZhCN 中文简体 */ LangZhCN = "zh-CN", /** * LangEnUS 英文-美国 */ LangEnUS = "en-US", }; /** * PathsConfig 路径配置集合 */ export class PathsConfig { /** * 配置文件路径 */ "configPath": string; /** * 日志文件路径 */ "logPath": string; /** * 数据存储路径 */ "dataPath": string; /** Creates a new PathsConfig instance. */ constructor($$source: Partial = {}) { if (!("configPath" in $$source)) { this["configPath"] = ""; } if (!("logPath" in $$source)) { this["logPath"] = ""; } if (!("dataPath" in $$source)) { this["dataPath"] = ""; } Object.assign(this, $$source); } /** * Creates a new PathsConfig instance from a string or object. */ static createFrom($$source: any = {}): PathsConfig { let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source; return new PathsConfig($$parsedSource as Partial); } } /** * TabType 定义了制表符类型 */ export enum TabType { /** * The Go zero value for the underlying type of the enum. */ $zero = "", /** * TabTypeSpaces 使用空格作为制表符 */ TabTypeSpaces = "spaces", /** * TabTypeTab 使用Tab作为制表符 */ TabTypeTab = "tab", }; // Private type creation functions const $$createType0 = EditorConfig.createFrom; const $$createType1 = PathsConfig.createFrom; const $$createType2 = ConfigMetadata.createFrom;