61 lines
1.6 KiB
TypeScript
61 lines
1.6 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 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;
|
|
"CreatedAt": number;
|
|
|
|
/** Creates a new Post instance. */
|
|
constructor($$source: Partial<Post> = {}) {
|
|
if (!("Id" in $$source)) {
|
|
this["Id"] = 0;
|
|
}
|
|
if (!("Text" in $$source)) {
|
|
this["Text"] = "";
|
|
}
|
|
if (!("CreatedAt" in $$source)) {
|
|
this["CreatedAt"] = 0;
|
|
}
|
|
|
|
Object.assign(this, $$source);
|
|
}
|
|
|
|
/**
|
|
* Creates a new Post instance from a string or object.
|
|
*/
|
|
static createFrom($$source: any = {}): Post {
|
|
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
|
|
return new Post($$parsedSource as Partial<Post>);
|
|
}
|
|
}
|