feat: crudgen

This commit is contained in:
2025-01-06 00:09:51 +07:00
parent 8c2f415e80
commit 7b2afbcc46
17 changed files with 728 additions and 23 deletions

View File

@@ -5,6 +5,31 @@
// @ts-ignore: Unused imports
import {Create as $Create} from "@wailsio/runtime";
export class Author {
"Id": number;
"Name": string;
/** Creates a new Author instance. */
constructor($$source: Partial<Author> = {}) {
if (!("Id" in $$source)) {
this["Id"] = 0;
}
if (!("Name" in $$source)) {
this["Name"] = "";
}
Object.assign(this, $$source);
}
/**
* Creates a new Author instance from a string or object.
*/
static createFrom($$source: any = {}): Author {
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
return new Author($$parsedSource as Partial<Author>);
}
}
export class Post {
"Id": number;
"Text": string;