feat: excel service
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
// @ts-check
|
||||
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
||||
// This file is automatically generated. DO NOT EDIT
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
// @ts-check
|
||||
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
||||
// This file is automatically generated. DO NOT EDIT
|
||||
|
||||
@@ -6,23 +7,37 @@
|
||||
import {Create as $Create} from "@wailsio/runtime";
|
||||
|
||||
export class Author {
|
||||
"Id": number;
|
||||
"Name": string;
|
||||
"Posts": Post[];
|
||||
"Comments": Comment[];
|
||||
|
||||
/** Creates a new Author instance. */
|
||||
constructor($$source: Partial<Author> = {}) {
|
||||
/**
|
||||
* Creates a new Author instance.
|
||||
* @param {Partial<Author>} [$$source = {}] - The source object to create the Author.
|
||||
*/
|
||||
constructor($$source = {}) {
|
||||
if (!("Id" in $$source)) {
|
||||
/**
|
||||
* @member
|
||||
* @type {number}
|
||||
*/
|
||||
this["Id"] = 0;
|
||||
}
|
||||
if (!("Name" in $$source)) {
|
||||
/**
|
||||
* @member
|
||||
* @type {string}
|
||||
*/
|
||||
this["Name"] = "";
|
||||
}
|
||||
if (!("Posts" in $$source)) {
|
||||
/**
|
||||
* @member
|
||||
* @type {Post[]}
|
||||
*/
|
||||
this["Posts"] = [];
|
||||
}
|
||||
if (!("Comments" in $$source)) {
|
||||
/**
|
||||
* @member
|
||||
* @type {Comment[]}
|
||||
*/
|
||||
this["Comments"] = [];
|
||||
}
|
||||
|
||||
@@ -31,8 +46,10 @@ export class Author {
|
||||
|
||||
/**
|
||||
* Creates a new Author instance from a string or object.
|
||||
* @param {any} [$$source = {}]
|
||||
* @returns {Author}
|
||||
*/
|
||||
static createFrom($$source: any = {}): Author {
|
||||
static createFrom($$source = {}) {
|
||||
const $$createField2_0 = $$createType1;
|
||||
const $$createField3_0 = $$createType3;
|
||||
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
|
||||
@@ -42,32 +59,49 @@ export class Author {
|
||||
if ("Comments" in $$parsedSource) {
|
||||
$$parsedSource["Comments"] = $$createField3_0($$parsedSource["Comments"]);
|
||||
}
|
||||
return new Author($$parsedSource as Partial<Author>);
|
||||
return new Author(/** @type {Partial<Author>} */($$parsedSource));
|
||||
}
|
||||
}
|
||||
|
||||
export class Comment {
|
||||
"Id": number;
|
||||
"Text": string;
|
||||
"AuthorId": number;
|
||||
"Author": Author;
|
||||
"Posts": Post[];
|
||||
|
||||
/** Creates a new Comment instance. */
|
||||
constructor($$source: Partial<Comment> = {}) {
|
||||
/**
|
||||
* Creates a new Comment instance.
|
||||
* @param {Partial<Comment>} [$$source = {}] - The source object to create the Comment.
|
||||
*/
|
||||
constructor($$source = {}) {
|
||||
if (!("Id" in $$source)) {
|
||||
/**
|
||||
* @member
|
||||
* @type {number}
|
||||
*/
|
||||
this["Id"] = 0;
|
||||
}
|
||||
if (!("Text" in $$source)) {
|
||||
/**
|
||||
* @member
|
||||
* @type {string}
|
||||
*/
|
||||
this["Text"] = "";
|
||||
}
|
||||
if (!("AuthorId" in $$source)) {
|
||||
/**
|
||||
* @member
|
||||
* @type {number}
|
||||
*/
|
||||
this["AuthorId"] = 0;
|
||||
}
|
||||
if (!("Author" in $$source)) {
|
||||
/**
|
||||
* @member
|
||||
* @type {Author}
|
||||
*/
|
||||
this["Author"] = (new Author());
|
||||
}
|
||||
if (!("Posts" in $$source)) {
|
||||
/**
|
||||
* @member
|
||||
* @type {Post[]}
|
||||
*/
|
||||
this["Posts"] = [];
|
||||
}
|
||||
|
||||
@@ -76,8 +110,10 @@ export class Comment {
|
||||
|
||||
/**
|
||||
* Creates a new Comment instance from a string or object.
|
||||
* @param {any} [$$source = {}]
|
||||
* @returns {Comment}
|
||||
*/
|
||||
static createFrom($$source: any = {}): Comment {
|
||||
static createFrom($$source = {}) {
|
||||
const $$createField3_0 = $$createType4;
|
||||
const $$createField4_0 = $$createType1;
|
||||
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
|
||||
@@ -87,48 +123,77 @@ export class Comment {
|
||||
if ("Posts" in $$parsedSource) {
|
||||
$$parsedSource["Posts"] = $$createField4_0($$parsedSource["Posts"]);
|
||||
}
|
||||
return new Comment($$parsedSource as Partial<Comment>);
|
||||
return new Comment(/** @type {Partial<Comment>} */($$parsedSource));
|
||||
}
|
||||
}
|
||||
|
||||
export class Post {
|
||||
"Id": number;
|
||||
"Text": string;
|
||||
"Deadline": number;
|
||||
"CreatedAt": number;
|
||||
"AuthorId": number;
|
||||
"Author": Author;
|
||||
"PostTypeId": number;
|
||||
"PostType": PostType;
|
||||
"Comments": Comment[];
|
||||
|
||||
/** Creates a new Post instance. */
|
||||
constructor($$source: Partial<Post> = {}) {
|
||||
/**
|
||||
* Creates a new Post instance.
|
||||
* @param {Partial<Post>} [$$source = {}] - The source object to create the Post.
|
||||
*/
|
||||
constructor($$source = {}) {
|
||||
if (!("Id" in $$source)) {
|
||||
/**
|
||||
* @member
|
||||
* @type {number}
|
||||
*/
|
||||
this["Id"] = 0;
|
||||
}
|
||||
if (!("Text" in $$source)) {
|
||||
/**
|
||||
* @member
|
||||
* @type {string}
|
||||
*/
|
||||
this["Text"] = "";
|
||||
}
|
||||
if (!("Deadline" in $$source)) {
|
||||
/**
|
||||
* @member
|
||||
* @type {number}
|
||||
*/
|
||||
this["Deadline"] = 0;
|
||||
}
|
||||
if (!("CreatedAt" in $$source)) {
|
||||
/**
|
||||
* @member
|
||||
* @type {number}
|
||||
*/
|
||||
this["CreatedAt"] = 0;
|
||||
}
|
||||
if (!("AuthorId" in $$source)) {
|
||||
/**
|
||||
* @member
|
||||
* @type {number}
|
||||
*/
|
||||
this["AuthorId"] = 0;
|
||||
}
|
||||
if (!("Author" in $$source)) {
|
||||
/**
|
||||
* @member
|
||||
* @type {Author}
|
||||
*/
|
||||
this["Author"] = (new Author());
|
||||
}
|
||||
if (!("PostTypeId" in $$source)) {
|
||||
/**
|
||||
* @member
|
||||
* @type {number}
|
||||
*/
|
||||
this["PostTypeId"] = 0;
|
||||
}
|
||||
if (!("PostType" in $$source)) {
|
||||
/**
|
||||
* @member
|
||||
* @type {PostType}
|
||||
*/
|
||||
this["PostType"] = (new PostType());
|
||||
}
|
||||
if (!("Comments" in $$source)) {
|
||||
/**
|
||||
* @member
|
||||
* @type {Comment[]}
|
||||
*/
|
||||
this["Comments"] = [];
|
||||
}
|
||||
|
||||
@@ -137,8 +202,10 @@ export class Post {
|
||||
|
||||
/**
|
||||
* Creates a new Post instance from a string or object.
|
||||
* @param {any} [$$source = {}]
|
||||
* @returns {Post}
|
||||
*/
|
||||
static createFrom($$source: any = {}): Post {
|
||||
static createFrom($$source = {}) {
|
||||
const $$createField5_0 = $$createType4;
|
||||
const $$createField7_0 = $$createType5;
|
||||
const $$createField8_0 = $$createType3;
|
||||
@@ -152,20 +219,28 @@ export class Post {
|
||||
if ("Comments" in $$parsedSource) {
|
||||
$$parsedSource["Comments"] = $$createField8_0($$parsedSource["Comments"]);
|
||||
}
|
||||
return new Post($$parsedSource as Partial<Post>);
|
||||
return new Post(/** @type {Partial<Post>} */($$parsedSource));
|
||||
}
|
||||
}
|
||||
|
||||
export class PostType {
|
||||
"Id": number;
|
||||
"Name": string;
|
||||
|
||||
/** Creates a new PostType instance. */
|
||||
constructor($$source: Partial<PostType> = {}) {
|
||||
/**
|
||||
* Creates a new PostType instance.
|
||||
* @param {Partial<PostType>} [$$source = {}] - The source object to create the PostType.
|
||||
*/
|
||||
constructor($$source = {}) {
|
||||
if (!("Id" in $$source)) {
|
||||
/**
|
||||
* @member
|
||||
* @type {number}
|
||||
*/
|
||||
this["Id"] = 0;
|
||||
}
|
||||
if (!("Name" in $$source)) {
|
||||
/**
|
||||
* @member
|
||||
* @type {string}
|
||||
*/
|
||||
this["Name"] = "";
|
||||
}
|
||||
|
||||
@@ -174,10 +249,12 @@ export class PostType {
|
||||
|
||||
/**
|
||||
* Creates a new PostType instance from a string or object.
|
||||
* @param {any} [$$source = {}]
|
||||
* @returns {PostType}
|
||||
*/
|
||||
static createFrom($$source: any = {}): PostType {
|
||||
static createFrom($$source = {}) {
|
||||
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
|
||||
return new PostType($$parsedSource as Partial<PostType>);
|
||||
return new PostType(/** @type {Partial<PostType>} */($$parsedSource));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user