fix: bindings for excel module
This commit is contained in:
@@ -1,4 +1,3 @@
|
|||||||
// @ts-check
|
|
||||||
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
||||||
// This file is automatically generated. DO NOT EDIT
|
// This file is automatically generated. DO NOT EDIT
|
||||||
|
|
||||||
@@ -1,4 +1,3 @@
|
|||||||
// @ts-check
|
|
||||||
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
||||||
// This file is automatically generated. DO NOT EDIT
|
// This file is automatically generated. DO NOT EDIT
|
||||||
|
|
||||||
@@ -7,37 +6,23 @@
|
|||||||
import {Create as $Create} from "@wailsio/runtime";
|
import {Create as $Create} from "@wailsio/runtime";
|
||||||
|
|
||||||
export class Author {
|
export class Author {
|
||||||
/**
|
"Id": number;
|
||||||
* Creates a new Author instance.
|
"Name": string;
|
||||||
* @param {Partial<Author>} [$$source = {}] - The source object to create the Author.
|
"Posts": Post[];
|
||||||
*/
|
"Comments": Comment[];
|
||||||
constructor($$source = {}) {
|
|
||||||
|
/** Creates a new Author instance. */
|
||||||
|
constructor($$source: Partial<Author> = {}) {
|
||||||
if (!("Id" in $$source)) {
|
if (!("Id" in $$source)) {
|
||||||
/**
|
|
||||||
* @member
|
|
||||||
* @type {number}
|
|
||||||
*/
|
|
||||||
this["Id"] = 0;
|
this["Id"] = 0;
|
||||||
}
|
}
|
||||||
if (!("Name" in $$source)) {
|
if (!("Name" in $$source)) {
|
||||||
/**
|
|
||||||
* @member
|
|
||||||
* @type {string}
|
|
||||||
*/
|
|
||||||
this["Name"] = "";
|
this["Name"] = "";
|
||||||
}
|
}
|
||||||
if (!("Posts" in $$source)) {
|
if (!("Posts" in $$source)) {
|
||||||
/**
|
|
||||||
* @member
|
|
||||||
* @type {Post[]}
|
|
||||||
*/
|
|
||||||
this["Posts"] = [];
|
this["Posts"] = [];
|
||||||
}
|
}
|
||||||
if (!("Comments" in $$source)) {
|
if (!("Comments" in $$source)) {
|
||||||
/**
|
|
||||||
* @member
|
|
||||||
* @type {Comment[]}
|
|
||||||
*/
|
|
||||||
this["Comments"] = [];
|
this["Comments"] = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -46,10 +31,8 @@ export class Author {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new Author instance from a string or object.
|
* Creates a new Author instance from a string or object.
|
||||||
* @param {any} [$$source = {}]
|
|
||||||
* @returns {Author}
|
|
||||||
*/
|
*/
|
||||||
static createFrom($$source = {}) {
|
static createFrom($$source: any = {}): Author {
|
||||||
const $$createField2_0 = $$createType1;
|
const $$createField2_0 = $$createType1;
|
||||||
const $$createField3_0 = $$createType3;
|
const $$createField3_0 = $$createType3;
|
||||||
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
|
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
|
||||||
@@ -59,49 +42,32 @@ export class Author {
|
|||||||
if ("Comments" in $$parsedSource) {
|
if ("Comments" in $$parsedSource) {
|
||||||
$$parsedSource["Comments"] = $$createField3_0($$parsedSource["Comments"]);
|
$$parsedSource["Comments"] = $$createField3_0($$parsedSource["Comments"]);
|
||||||
}
|
}
|
||||||
return new Author(/** @type {Partial<Author>} */($$parsedSource));
|
return new Author($$parsedSource as Partial<Author>);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export class Comment {
|
export class Comment {
|
||||||
/**
|
"Id": number;
|
||||||
* Creates a new Comment instance.
|
"Text": string;
|
||||||
* @param {Partial<Comment>} [$$source = {}] - The source object to create the Comment.
|
"AuthorId": number;
|
||||||
*/
|
"Author": Author;
|
||||||
constructor($$source = {}) {
|
"Posts": Post[];
|
||||||
|
|
||||||
|
/** Creates a new Comment instance. */
|
||||||
|
constructor($$source: Partial<Comment> = {}) {
|
||||||
if (!("Id" in $$source)) {
|
if (!("Id" in $$source)) {
|
||||||
/**
|
|
||||||
* @member
|
|
||||||
* @type {number}
|
|
||||||
*/
|
|
||||||
this["Id"] = 0;
|
this["Id"] = 0;
|
||||||
}
|
}
|
||||||
if (!("Text" in $$source)) {
|
if (!("Text" in $$source)) {
|
||||||
/**
|
|
||||||
* @member
|
|
||||||
* @type {string}
|
|
||||||
*/
|
|
||||||
this["Text"] = "";
|
this["Text"] = "";
|
||||||
}
|
}
|
||||||
if (!("AuthorId" in $$source)) {
|
if (!("AuthorId" in $$source)) {
|
||||||
/**
|
|
||||||
* @member
|
|
||||||
* @type {number}
|
|
||||||
*/
|
|
||||||
this["AuthorId"] = 0;
|
this["AuthorId"] = 0;
|
||||||
}
|
}
|
||||||
if (!("Author" in $$source)) {
|
if (!("Author" in $$source)) {
|
||||||
/**
|
|
||||||
* @member
|
|
||||||
* @type {Author}
|
|
||||||
*/
|
|
||||||
this["Author"] = (new Author());
|
this["Author"] = (new Author());
|
||||||
}
|
}
|
||||||
if (!("Posts" in $$source)) {
|
if (!("Posts" in $$source)) {
|
||||||
/**
|
|
||||||
* @member
|
|
||||||
* @type {Post[]}
|
|
||||||
*/
|
|
||||||
this["Posts"] = [];
|
this["Posts"] = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -110,10 +76,8 @@ export class Comment {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new Comment instance from a string or object.
|
* Creates a new Comment instance from a string or object.
|
||||||
* @param {any} [$$source = {}]
|
|
||||||
* @returns {Comment}
|
|
||||||
*/
|
*/
|
||||||
static createFrom($$source = {}) {
|
static createFrom($$source: any = {}): Comment {
|
||||||
const $$createField3_0 = $$createType4;
|
const $$createField3_0 = $$createType4;
|
||||||
const $$createField4_0 = $$createType1;
|
const $$createField4_0 = $$createType1;
|
||||||
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
|
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
|
||||||
@@ -123,77 +87,48 @@ export class Comment {
|
|||||||
if ("Posts" in $$parsedSource) {
|
if ("Posts" in $$parsedSource) {
|
||||||
$$parsedSource["Posts"] = $$createField4_0($$parsedSource["Posts"]);
|
$$parsedSource["Posts"] = $$createField4_0($$parsedSource["Posts"]);
|
||||||
}
|
}
|
||||||
return new Comment(/** @type {Partial<Comment>} */($$parsedSource));
|
return new Comment($$parsedSource as Partial<Comment>);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export class Post {
|
export class Post {
|
||||||
/**
|
"Id": number;
|
||||||
* Creates a new Post instance.
|
"Text": string;
|
||||||
* @param {Partial<Post>} [$$source = {}] - The source object to create the Post.
|
"Deadline": number;
|
||||||
*/
|
"CreatedAt": number;
|
||||||
constructor($$source = {}) {
|
"AuthorId": number;
|
||||||
|
"Author": Author;
|
||||||
|
"PostTypeId": number;
|
||||||
|
"PostType": PostType;
|
||||||
|
"Comments": Comment[];
|
||||||
|
|
||||||
|
/** Creates a new Post instance. */
|
||||||
|
constructor($$source: Partial<Post> = {}) {
|
||||||
if (!("Id" in $$source)) {
|
if (!("Id" in $$source)) {
|
||||||
/**
|
|
||||||
* @member
|
|
||||||
* @type {number}
|
|
||||||
*/
|
|
||||||
this["Id"] = 0;
|
this["Id"] = 0;
|
||||||
}
|
}
|
||||||
if (!("Text" in $$source)) {
|
if (!("Text" in $$source)) {
|
||||||
/**
|
|
||||||
* @member
|
|
||||||
* @type {string}
|
|
||||||
*/
|
|
||||||
this["Text"] = "";
|
this["Text"] = "";
|
||||||
}
|
}
|
||||||
if (!("Deadline" in $$source)) {
|
if (!("Deadline" in $$source)) {
|
||||||
/**
|
|
||||||
* @member
|
|
||||||
* @type {number}
|
|
||||||
*/
|
|
||||||
this["Deadline"] = 0;
|
this["Deadline"] = 0;
|
||||||
}
|
}
|
||||||
if (!("CreatedAt" in $$source)) {
|
if (!("CreatedAt" in $$source)) {
|
||||||
/**
|
|
||||||
* @member
|
|
||||||
* @type {number}
|
|
||||||
*/
|
|
||||||
this["CreatedAt"] = 0;
|
this["CreatedAt"] = 0;
|
||||||
}
|
}
|
||||||
if (!("AuthorId" in $$source)) {
|
if (!("AuthorId" in $$source)) {
|
||||||
/**
|
|
||||||
* @member
|
|
||||||
* @type {number}
|
|
||||||
*/
|
|
||||||
this["AuthorId"] = 0;
|
this["AuthorId"] = 0;
|
||||||
}
|
}
|
||||||
if (!("Author" in $$source)) {
|
if (!("Author" in $$source)) {
|
||||||
/**
|
|
||||||
* @member
|
|
||||||
* @type {Author}
|
|
||||||
*/
|
|
||||||
this["Author"] = (new Author());
|
this["Author"] = (new Author());
|
||||||
}
|
}
|
||||||
if (!("PostTypeId" in $$source)) {
|
if (!("PostTypeId" in $$source)) {
|
||||||
/**
|
|
||||||
* @member
|
|
||||||
* @type {number}
|
|
||||||
*/
|
|
||||||
this["PostTypeId"] = 0;
|
this["PostTypeId"] = 0;
|
||||||
}
|
}
|
||||||
if (!("PostType" in $$source)) {
|
if (!("PostType" in $$source)) {
|
||||||
/**
|
|
||||||
* @member
|
|
||||||
* @type {PostType}
|
|
||||||
*/
|
|
||||||
this["PostType"] = (new PostType());
|
this["PostType"] = (new PostType());
|
||||||
}
|
}
|
||||||
if (!("Comments" in $$source)) {
|
if (!("Comments" in $$source)) {
|
||||||
/**
|
|
||||||
* @member
|
|
||||||
* @type {Comment[]}
|
|
||||||
*/
|
|
||||||
this["Comments"] = [];
|
this["Comments"] = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -202,10 +137,8 @@ export class Post {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new Post instance from a string or object.
|
* Creates a new Post instance from a string or object.
|
||||||
* @param {any} [$$source = {}]
|
|
||||||
* @returns {Post}
|
|
||||||
*/
|
*/
|
||||||
static createFrom($$source = {}) {
|
static createFrom($$source: any = {}): Post {
|
||||||
const $$createField5_0 = $$createType4;
|
const $$createField5_0 = $$createType4;
|
||||||
const $$createField7_0 = $$createType5;
|
const $$createField7_0 = $$createType5;
|
||||||
const $$createField8_0 = $$createType3;
|
const $$createField8_0 = $$createType3;
|
||||||
@@ -219,28 +152,20 @@ export class Post {
|
|||||||
if ("Comments" in $$parsedSource) {
|
if ("Comments" in $$parsedSource) {
|
||||||
$$parsedSource["Comments"] = $$createField8_0($$parsedSource["Comments"]);
|
$$parsedSource["Comments"] = $$createField8_0($$parsedSource["Comments"]);
|
||||||
}
|
}
|
||||||
return new Post(/** @type {Partial<Post>} */($$parsedSource));
|
return new Post($$parsedSource as Partial<Post>);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export class PostType {
|
export class PostType {
|
||||||
/**
|
"Id": number;
|
||||||
* Creates a new PostType instance.
|
"Name": string;
|
||||||
* @param {Partial<PostType>} [$$source = {}] - The source object to create the PostType.
|
|
||||||
*/
|
/** Creates a new PostType instance. */
|
||||||
constructor($$source = {}) {
|
constructor($$source: Partial<PostType> = {}) {
|
||||||
if (!("Id" in $$source)) {
|
if (!("Id" in $$source)) {
|
||||||
/**
|
|
||||||
* @member
|
|
||||||
* @type {number}
|
|
||||||
*/
|
|
||||||
this["Id"] = 0;
|
this["Id"] = 0;
|
||||||
}
|
}
|
||||||
if (!("Name" in $$source)) {
|
if (!("Name" in $$source)) {
|
||||||
/**
|
|
||||||
* @member
|
|
||||||
* @type {string}
|
|
||||||
*/
|
|
||||||
this["Name"] = "";
|
this["Name"] = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -249,12 +174,10 @@ export class PostType {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a new PostType instance from a string or object.
|
* Creates a new PostType instance from a string or object.
|
||||||
* @param {any} [$$source = {}]
|
|
||||||
* @returns {PostType}
|
|
||||||
*/
|
*/
|
||||||
static createFrom($$source = {}) {
|
static createFrom($$source: any = {}): PostType {
|
||||||
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
|
let $$parsedSource = typeof $$source === 'string' ? JSON.parse($$source) : $$source;
|
||||||
return new PostType(/** @type {Partial<PostType>} */($$parsedSource));
|
return new PostType($$parsedSource as Partial<PostType>);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1,101 +0,0 @@
|
|||||||
// @ts-check
|
|
||||||
// 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 {Call as $Call, Create as $Create} from "@wailsio/runtime";
|
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
||||||
// @ts-ignore: Unused imports
|
|
||||||
import * as models$0 from "../models/models.js";
|
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
||||||
// @ts-ignore: Unused imports
|
|
||||||
import * as $models from "./models.js";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @returns {Promise<number> & { cancel(): void }}
|
|
||||||
*/
|
|
||||||
export function Count() {
|
|
||||||
let $resultPromise = /** @type {any} */($Call.ByID(3969879864));
|
|
||||||
return $resultPromise;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param {$models.Author} item
|
|
||||||
* @returns {Promise<$models.Author> & { cancel(): void }}
|
|
||||||
*/
|
|
||||||
export function Create(item) {
|
|
||||||
let $resultPromise = /** @type {any} */($Call.ByID(3684602449, item));
|
|
||||||
let $typingPromise = /** @type {any} */($resultPromise.then(($result) => {
|
|
||||||
return $$createType0($result);
|
|
||||||
}));
|
|
||||||
$typingPromise.cancel = $resultPromise.cancel.bind($resultPromise);
|
|
||||||
return $typingPromise;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param {number} id
|
|
||||||
* @returns {Promise<void> & { cancel(): void }}
|
|
||||||
*/
|
|
||||||
export function Delete(id) {
|
|
||||||
let $resultPromise = /** @type {any} */($Call.ByID(2096845974, id));
|
|
||||||
return $resultPromise;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @returns {Promise<($models.Author | null)[]> & { cancel(): void }}
|
|
||||||
*/
|
|
||||||
export function GetAll() {
|
|
||||||
let $resultPromise = /** @type {any} */($Call.ByID(3248293926));
|
|
||||||
let $typingPromise = /** @type {any} */($resultPromise.then(($result) => {
|
|
||||||
return $$createType2($result);
|
|
||||||
}));
|
|
||||||
$typingPromise.cancel = $resultPromise.cancel.bind($resultPromise);
|
|
||||||
return $typingPromise;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param {number} id
|
|
||||||
* @returns {Promise<$models.Author | null> & { cancel(): void }}
|
|
||||||
*/
|
|
||||||
export function GetById(id) {
|
|
||||||
let $resultPromise = /** @type {any} */($Call.ByID(1703016211, id));
|
|
||||||
let $typingPromise = /** @type {any} */($resultPromise.then(($result) => {
|
|
||||||
return $$createType1($result);
|
|
||||||
}));
|
|
||||||
$typingPromise.cancel = $resultPromise.cancel.bind($resultPromise);
|
|
||||||
return $typingPromise;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param {{ [_: string]: string }} fieldsSortOrder
|
|
||||||
* @returns {Promise<($models.Author | null)[]> & { cancel(): void }}
|
|
||||||
*/
|
|
||||||
export function SortedByOrder(fieldsSortOrder) {
|
|
||||||
let $resultPromise = /** @type {any} */($Call.ByID(3046628691, fieldsSortOrder));
|
|
||||||
let $typingPromise = /** @type {any} */($resultPromise.then(($result) => {
|
|
||||||
return $$createType2($result);
|
|
||||||
}));
|
|
||||||
$typingPromise.cancel = $resultPromise.cancel.bind($resultPromise);
|
|
||||||
return $typingPromise;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param {$models.Author} item
|
|
||||||
* @returns {Promise<$models.Author> & { cancel(): void }}
|
|
||||||
*/
|
|
||||||
export function Update(item) {
|
|
||||||
let $resultPromise = /** @type {any} */($Call.ByID(2240704960, item));
|
|
||||||
let $typingPromise = /** @type {any} */($resultPromise.then(($result) => {
|
|
||||||
return $$createType0($result);
|
|
||||||
}));
|
|
||||||
$typingPromise.cancel = $resultPromise.cancel.bind($resultPromise);
|
|
||||||
return $typingPromise;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Private type creation functions
|
|
||||||
const $$createType0 = models$0.Author.createFrom;
|
|
||||||
const $$createType1 = $Create.Nullable($$createType0);
|
|
||||||
const $$createType2 = $Create.Array($$createType1);
|
|
||||||
74
frontend/bindings/app/internal/services/authorservice.ts
Normal file
74
frontend/bindings/app/internal/services/authorservice.ts
Normal file
@@ -0,0 +1,74 @@
|
|||||||
|
// 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 {Call as $Call, Create as $Create} from "@wailsio/runtime";
|
||||||
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||||
|
// @ts-ignore: Unused imports
|
||||||
|
import * as models$0 from "../models/models.js";
|
||||||
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||||
|
// @ts-ignore: Unused imports
|
||||||
|
import * as $models from "./models.js";
|
||||||
|
|
||||||
|
export function Count(): Promise<number> & { cancel(): void } {
|
||||||
|
let $resultPromise = $Call.ByID(3969879864) as any;
|
||||||
|
return $resultPromise;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function Create(item: $models.Author): Promise<$models.Author> & { cancel(): void } {
|
||||||
|
let $resultPromise = $Call.ByID(3684602449, item) as any;
|
||||||
|
let $typingPromise = $resultPromise.then(($result: any) => {
|
||||||
|
return $$createType0($result);
|
||||||
|
}) as any;
|
||||||
|
$typingPromise.cancel = $resultPromise.cancel.bind($resultPromise);
|
||||||
|
return $typingPromise;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function Delete(id: number): Promise<void> & { cancel(): void } {
|
||||||
|
let $resultPromise = $Call.ByID(2096845974, id) as any;
|
||||||
|
return $resultPromise;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function GetAll(): Promise<($models.Author | null)[]> & { cancel(): void } {
|
||||||
|
let $resultPromise = $Call.ByID(3248293926) as any;
|
||||||
|
let $typingPromise = $resultPromise.then(($result: any) => {
|
||||||
|
return $$createType2($result);
|
||||||
|
}) as any;
|
||||||
|
$typingPromise.cancel = $resultPromise.cancel.bind($resultPromise);
|
||||||
|
return $typingPromise;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function GetById(id: number): Promise<$models.Author | null> & { cancel(): void } {
|
||||||
|
let $resultPromise = $Call.ByID(1703016211, id) as any;
|
||||||
|
let $typingPromise = $resultPromise.then(($result: any) => {
|
||||||
|
return $$createType1($result);
|
||||||
|
}) as any;
|
||||||
|
$typingPromise.cancel = $resultPromise.cancel.bind($resultPromise);
|
||||||
|
return $typingPromise;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function SortedByOrder(fieldsSortOrder: { [_: string]: string }): Promise<($models.Author | null)[]> & { cancel(): void } {
|
||||||
|
let $resultPromise = $Call.ByID(3046628691, fieldsSortOrder) as any;
|
||||||
|
let $typingPromise = $resultPromise.then(($result: any) => {
|
||||||
|
return $$createType2($result);
|
||||||
|
}) as any;
|
||||||
|
$typingPromise.cancel = $resultPromise.cancel.bind($resultPromise);
|
||||||
|
return $typingPromise;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function Update(item: $models.Author): Promise<$models.Author> & { cancel(): void } {
|
||||||
|
let $resultPromise = $Call.ByID(2240704960, item) as any;
|
||||||
|
let $typingPromise = $resultPromise.then(($result: any) => {
|
||||||
|
return $$createType0($result);
|
||||||
|
}) as any;
|
||||||
|
$typingPromise.cancel = $resultPromise.cancel.bind($resultPromise);
|
||||||
|
return $typingPromise;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Private type creation functions
|
||||||
|
const $$createType0 = models$0.Author.createFrom;
|
||||||
|
const $$createType1 = $Create.Nullable($$createType0);
|
||||||
|
const $$createType2 = $Create.Array($$createType1);
|
||||||
@@ -1,101 +0,0 @@
|
|||||||
// @ts-check
|
|
||||||
// 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 {Call as $Call, Create as $Create} from "@wailsio/runtime";
|
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
||||||
// @ts-ignore: Unused imports
|
|
||||||
import * as models$0 from "../models/models.js";
|
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
||||||
// @ts-ignore: Unused imports
|
|
||||||
import * as $models from "./models.js";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @returns {Promise<number> & { cancel(): void }}
|
|
||||||
*/
|
|
||||||
export function Count() {
|
|
||||||
let $resultPromise = /** @type {any} */($Call.ByID(3225397984));
|
|
||||||
return $resultPromise;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param {$models.Comment} item
|
|
||||||
* @returns {Promise<$models.Comment> & { cancel(): void }}
|
|
||||||
*/
|
|
||||||
export function Create(item) {
|
|
||||||
let $resultPromise = /** @type {any} */($Call.ByID(4239106089, item));
|
|
||||||
let $typingPromise = /** @type {any} */($resultPromise.then(($result) => {
|
|
||||||
return $$createType0($result);
|
|
||||||
}));
|
|
||||||
$typingPromise.cancel = $resultPromise.cancel.bind($resultPromise);
|
|
||||||
return $typingPromise;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param {number} id
|
|
||||||
* @returns {Promise<void> & { cancel(): void }}
|
|
||||||
*/
|
|
||||||
export function Delete(id) {
|
|
||||||
let $resultPromise = /** @type {any} */($Call.ByID(2553503582, id));
|
|
||||||
return $resultPromise;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @returns {Promise<($models.Comment | null)[]> & { cancel(): void }}
|
|
||||||
*/
|
|
||||||
export function GetAll() {
|
|
||||||
let $resultPromise = /** @type {any} */($Call.ByID(1805763390));
|
|
||||||
let $typingPromise = /** @type {any} */($resultPromise.then(($result) => {
|
|
||||||
return $$createType2($result);
|
|
||||||
}));
|
|
||||||
$typingPromise.cancel = $resultPromise.cancel.bind($resultPromise);
|
|
||||||
return $typingPromise;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param {number} id
|
|
||||||
* @returns {Promise<$models.Comment | null> & { cancel(): void }}
|
|
||||||
*/
|
|
||||||
export function GetById(id) {
|
|
||||||
let $resultPromise = /** @type {any} */($Call.ByID(3217823099, id));
|
|
||||||
let $typingPromise = /** @type {any} */($resultPromise.then(($result) => {
|
|
||||||
return $$createType1($result);
|
|
||||||
}));
|
|
||||||
$typingPromise.cancel = $resultPromise.cancel.bind($resultPromise);
|
|
||||||
return $typingPromise;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param {{ [_: string]: string }} fieldsSortOrder
|
|
||||||
* @returns {Promise<($models.Comment | null)[]> & { cancel(): void }}
|
|
||||||
*/
|
|
||||||
export function SortedByOrder(fieldsSortOrder) {
|
|
||||||
let $resultPromise = /** @type {any} */($Call.ByID(4244533291, fieldsSortOrder));
|
|
||||||
let $typingPromise = /** @type {any} */($resultPromise.then(($result) => {
|
|
||||||
return $$createType2($result);
|
|
||||||
}));
|
|
||||||
$typingPromise.cancel = $resultPromise.cancel.bind($resultPromise);
|
|
||||||
return $typingPromise;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param {$models.Comment} item
|
|
||||||
* @returns {Promise<$models.Comment> & { cancel(): void }}
|
|
||||||
*/
|
|
||||||
export function Update(item) {
|
|
||||||
let $resultPromise = /** @type {any} */($Call.ByID(3080970936, item));
|
|
||||||
let $typingPromise = /** @type {any} */($resultPromise.then(($result) => {
|
|
||||||
return $$createType0($result);
|
|
||||||
}));
|
|
||||||
$typingPromise.cancel = $resultPromise.cancel.bind($resultPromise);
|
|
||||||
return $typingPromise;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Private type creation functions
|
|
||||||
const $$createType0 = models$0.Comment.createFrom;
|
|
||||||
const $$createType1 = $Create.Nullable($$createType0);
|
|
||||||
const $$createType2 = $Create.Array($$createType1);
|
|
||||||
74
frontend/bindings/app/internal/services/commentservice.ts
Normal file
74
frontend/bindings/app/internal/services/commentservice.ts
Normal file
@@ -0,0 +1,74 @@
|
|||||||
|
// 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 {Call as $Call, Create as $Create} from "@wailsio/runtime";
|
||||||
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||||
|
// @ts-ignore: Unused imports
|
||||||
|
import * as models$0 from "../models/models.js";
|
||||||
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||||
|
// @ts-ignore: Unused imports
|
||||||
|
import * as $models from "./models.js";
|
||||||
|
|
||||||
|
export function Count(): Promise<number> & { cancel(): void } {
|
||||||
|
let $resultPromise = $Call.ByID(3225397984) as any;
|
||||||
|
return $resultPromise;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function Create(item: $models.Comment): Promise<$models.Comment> & { cancel(): void } {
|
||||||
|
let $resultPromise = $Call.ByID(4239106089, item) as any;
|
||||||
|
let $typingPromise = $resultPromise.then(($result: any) => {
|
||||||
|
return $$createType0($result);
|
||||||
|
}) as any;
|
||||||
|
$typingPromise.cancel = $resultPromise.cancel.bind($resultPromise);
|
||||||
|
return $typingPromise;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function Delete(id: number): Promise<void> & { cancel(): void } {
|
||||||
|
let $resultPromise = $Call.ByID(2553503582, id) as any;
|
||||||
|
return $resultPromise;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function GetAll(): Promise<($models.Comment | null)[]> & { cancel(): void } {
|
||||||
|
let $resultPromise = $Call.ByID(1805763390) as any;
|
||||||
|
let $typingPromise = $resultPromise.then(($result: any) => {
|
||||||
|
return $$createType2($result);
|
||||||
|
}) as any;
|
||||||
|
$typingPromise.cancel = $resultPromise.cancel.bind($resultPromise);
|
||||||
|
return $typingPromise;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function GetById(id: number): Promise<$models.Comment | null> & { cancel(): void } {
|
||||||
|
let $resultPromise = $Call.ByID(3217823099, id) as any;
|
||||||
|
let $typingPromise = $resultPromise.then(($result: any) => {
|
||||||
|
return $$createType1($result);
|
||||||
|
}) as any;
|
||||||
|
$typingPromise.cancel = $resultPromise.cancel.bind($resultPromise);
|
||||||
|
return $typingPromise;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function SortedByOrder(fieldsSortOrder: { [_: string]: string }): Promise<($models.Comment | null)[]> & { cancel(): void } {
|
||||||
|
let $resultPromise = $Call.ByID(4244533291, fieldsSortOrder) as any;
|
||||||
|
let $typingPromise = $resultPromise.then(($result: any) => {
|
||||||
|
return $$createType2($result);
|
||||||
|
}) as any;
|
||||||
|
$typingPromise.cancel = $resultPromise.cancel.bind($resultPromise);
|
||||||
|
return $typingPromise;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function Update(item: $models.Comment): Promise<$models.Comment> & { cancel(): void } {
|
||||||
|
let $resultPromise = $Call.ByID(3080970936, item) as any;
|
||||||
|
let $typingPromise = $resultPromise.then(($result: any) => {
|
||||||
|
return $$createType0($result);
|
||||||
|
}) as any;
|
||||||
|
$typingPromise.cancel = $resultPromise.cancel.bind($resultPromise);
|
||||||
|
return $typingPromise;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Private type creation functions
|
||||||
|
const $$createType0 = models$0.Comment.createFrom;
|
||||||
|
const $$createType1 = $Create.Nullable($$createType0);
|
||||||
|
const $$createType2 = $Create.Array($$createType1);
|
||||||
16
frontend/bindings/app/internal/services/excelmodule.ts
Normal file
16
frontend/bindings/app/internal/services/excelmodule.ts
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
// 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 {Call as $Call, Create as $Create} from "@wailsio/runtime";
|
||||||
|
|
||||||
|
export function ExportAllEntities(): Promise<void> & { cancel(): void } {
|
||||||
|
let $resultPromise = $Call.ByID(794946560) as any;
|
||||||
|
return $resultPromise;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function ImportAllEntities(): Promise<void> & { cancel(): void } {
|
||||||
|
let $resultPromise = $Call.ByID(2992267629) as any;
|
||||||
|
return $resultPromise;
|
||||||
|
}
|
||||||
@@ -1,14 +1,15 @@
|
|||||||
// @ts-check
|
|
||||||
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
||||||
// This file is automatically generated. DO NOT EDIT
|
// This file is automatically generated. DO NOT EDIT
|
||||||
|
|
||||||
import * as AuthorService from "./authorservice.js";
|
import * as AuthorService from "./authorservice.js";
|
||||||
import * as CommentService from "./commentservice.js";
|
import * as CommentService from "./commentservice.js";
|
||||||
|
import * as ExcelModule from "./excelmodule.js";
|
||||||
import * as PostService from "./postservice.js";
|
import * as PostService from "./postservice.js";
|
||||||
import * as PostTypeService from "./posttypeservice.js";
|
import * as PostTypeService from "./posttypeservice.js";
|
||||||
export {
|
export {
|
||||||
AuthorService,
|
AuthorService,
|
||||||
CommentService,
|
CommentService,
|
||||||
|
ExcelModule,
|
||||||
PostService,
|
PostService,
|
||||||
PostTypeService
|
PostTypeService
|
||||||
};
|
};
|
||||||
@@ -1,4 +1,3 @@
|
|||||||
// @ts-check
|
|
||||||
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
||||||
// This file is automatically generated. DO NOT EDIT
|
// This file is automatically generated. DO NOT EDIT
|
||||||
|
|
||||||
@@ -11,25 +10,13 @@ import {Create as $Create} from "@wailsio/runtime";
|
|||||||
import * as models$0 from "../models/models.js";
|
import * as models$0 from "../models/models.js";
|
||||||
|
|
||||||
export const Author = models$0.Author;
|
export const Author = models$0.Author;
|
||||||
|
export type Author = models$0.Author;
|
||||||
/**
|
|
||||||
* @typedef {models$0.Author} Author
|
|
||||||
*/
|
|
||||||
|
|
||||||
export const Comment = models$0.Comment;
|
export const Comment = models$0.Comment;
|
||||||
|
export type Comment = models$0.Comment;
|
||||||
/**
|
|
||||||
* @typedef {models$0.Comment} Comment
|
|
||||||
*/
|
|
||||||
|
|
||||||
export const Post = models$0.Post;
|
export const Post = models$0.Post;
|
||||||
|
export type Post = models$0.Post;
|
||||||
/**
|
|
||||||
* @typedef {models$0.Post} Post
|
|
||||||
*/
|
|
||||||
|
|
||||||
export const PostType = models$0.PostType;
|
export const PostType = models$0.PostType;
|
||||||
|
export type PostType = models$0.PostType;
|
||||||
/**
|
|
||||||
* @typedef {models$0.PostType} PostType
|
|
||||||
*/
|
|
||||||
@@ -1,109 +0,0 @@
|
|||||||
// @ts-check
|
|
||||||
// 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 {Call as $Call, Create as $Create} from "@wailsio/runtime";
|
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
||||||
// @ts-ignore: Unused imports
|
|
||||||
import * as models$0 from "../models/models.js";
|
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
||||||
// @ts-ignore: Unused imports
|
|
||||||
import * as $models from "./models.js";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @returns {Promise<number> & { cancel(): void }}
|
|
||||||
*/
|
|
||||||
export function Count() {
|
|
||||||
let $resultPromise = /** @type {any} */($Call.ByID(3109924027));
|
|
||||||
return $resultPromise;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param {$models.Post} item
|
|
||||||
* @returns {Promise<$models.Post> & { cancel(): void }}
|
|
||||||
*/
|
|
||||||
export function Create(item) {
|
|
||||||
let $resultPromise = /** @type {any} */($Call.ByID(1443399856, item));
|
|
||||||
let $typingPromise = /** @type {any} */($resultPromise.then(($result) => {
|
|
||||||
return $$createType0($result);
|
|
||||||
}));
|
|
||||||
$typingPromise.cancel = $resultPromise.cancel.bind($resultPromise);
|
|
||||||
return $typingPromise;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param {number} id
|
|
||||||
* @returns {Promise<void> & { cancel(): void }}
|
|
||||||
*/
|
|
||||||
export function Delete(id) {
|
|
||||||
let $resultPromise = /** @type {any} */($Call.ByID(2924549135, id));
|
|
||||||
return $resultPromise;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @returns {Promise<void> & { cancel(): void }}
|
|
||||||
*/
|
|
||||||
export function ExportToExcel() {
|
|
||||||
let $resultPromise = /** @type {any} */($Call.ByID(75322242));
|
|
||||||
return $resultPromise;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @returns {Promise<($models.Post | null)[]> & { cancel(): void }}
|
|
||||||
*/
|
|
||||||
export function GetAll() {
|
|
||||||
let $resultPromise = /** @type {any} */($Call.ByID(65691059));
|
|
||||||
let $typingPromise = /** @type {any} */($resultPromise.then(($result) => {
|
|
||||||
return $$createType2($result);
|
|
||||||
}));
|
|
||||||
$typingPromise.cancel = $resultPromise.cancel.bind($resultPromise);
|
|
||||||
return $typingPromise;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param {number} id
|
|
||||||
* @returns {Promise<$models.Post | null> & { cancel(): void }}
|
|
||||||
*/
|
|
||||||
export function GetById(id) {
|
|
||||||
let $resultPromise = /** @type {any} */($Call.ByID(4074736792, id));
|
|
||||||
let $typingPromise = /** @type {any} */($resultPromise.then(($result) => {
|
|
||||||
return $$createType1($result);
|
|
||||||
}));
|
|
||||||
$typingPromise.cancel = $resultPromise.cancel.bind($resultPromise);
|
|
||||||
return $typingPromise;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param {{ [_: string]: string }} fieldsSortOrder
|
|
||||||
* @returns {Promise<($models.Post | null)[]> & { cancel(): void }}
|
|
||||||
*/
|
|
||||||
export function SortedByOrder(fieldsSortOrder) {
|
|
||||||
let $resultPromise = /** @type {any} */($Call.ByID(471862744, fieldsSortOrder));
|
|
||||||
let $typingPromise = /** @type {any} */($resultPromise.then(($result) => {
|
|
||||||
return $$createType2($result);
|
|
||||||
}));
|
|
||||||
$typingPromise.cancel = $resultPromise.cancel.bind($resultPromise);
|
|
||||||
return $typingPromise;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param {$models.Post} item
|
|
||||||
* @returns {Promise<$models.Post> & { cancel(): void }}
|
|
||||||
*/
|
|
||||||
export function Update(item) {
|
|
||||||
let $resultPromise = /** @type {any} */($Call.ByID(137798821, item));
|
|
||||||
let $typingPromise = /** @type {any} */($resultPromise.then(($result) => {
|
|
||||||
return $$createType0($result);
|
|
||||||
}));
|
|
||||||
$typingPromise.cancel = $resultPromise.cancel.bind($resultPromise);
|
|
||||||
return $typingPromise;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Private type creation functions
|
|
||||||
const $$createType0 = models$0.Post.createFrom;
|
|
||||||
const $$createType1 = $Create.Nullable($$createType0);
|
|
||||||
const $$createType2 = $Create.Array($$createType1);
|
|
||||||
74
frontend/bindings/app/internal/services/postservice.ts
Normal file
74
frontend/bindings/app/internal/services/postservice.ts
Normal file
@@ -0,0 +1,74 @@
|
|||||||
|
// 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 {Call as $Call, Create as $Create} from "@wailsio/runtime";
|
||||||
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||||
|
// @ts-ignore: Unused imports
|
||||||
|
import * as models$0 from "../models/models.js";
|
||||||
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||||
|
// @ts-ignore: Unused imports
|
||||||
|
import * as $models from "./models.js";
|
||||||
|
|
||||||
|
export function Count(): Promise<number> & { cancel(): void } {
|
||||||
|
let $resultPromise = $Call.ByID(3109924027) as any;
|
||||||
|
return $resultPromise;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function Create(item: $models.Post): Promise<$models.Post> & { cancel(): void } {
|
||||||
|
let $resultPromise = $Call.ByID(1443399856, item) as any;
|
||||||
|
let $typingPromise = $resultPromise.then(($result: any) => {
|
||||||
|
return $$createType0($result);
|
||||||
|
}) as any;
|
||||||
|
$typingPromise.cancel = $resultPromise.cancel.bind($resultPromise);
|
||||||
|
return $typingPromise;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function Delete(id: number): Promise<void> & { cancel(): void } {
|
||||||
|
let $resultPromise = $Call.ByID(2924549135, id) as any;
|
||||||
|
return $resultPromise;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function GetAll(): Promise<($models.Post | null)[]> & { cancel(): void } {
|
||||||
|
let $resultPromise = $Call.ByID(65691059) as any;
|
||||||
|
let $typingPromise = $resultPromise.then(($result: any) => {
|
||||||
|
return $$createType2($result);
|
||||||
|
}) as any;
|
||||||
|
$typingPromise.cancel = $resultPromise.cancel.bind($resultPromise);
|
||||||
|
return $typingPromise;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function GetById(id: number): Promise<$models.Post | null> & { cancel(): void } {
|
||||||
|
let $resultPromise = $Call.ByID(4074736792, id) as any;
|
||||||
|
let $typingPromise = $resultPromise.then(($result: any) => {
|
||||||
|
return $$createType1($result);
|
||||||
|
}) as any;
|
||||||
|
$typingPromise.cancel = $resultPromise.cancel.bind($resultPromise);
|
||||||
|
return $typingPromise;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function SortedByOrder(fieldsSortOrder: { [_: string]: string }): Promise<($models.Post | null)[]> & { cancel(): void } {
|
||||||
|
let $resultPromise = $Call.ByID(471862744, fieldsSortOrder) as any;
|
||||||
|
let $typingPromise = $resultPromise.then(($result: any) => {
|
||||||
|
return $$createType2($result);
|
||||||
|
}) as any;
|
||||||
|
$typingPromise.cancel = $resultPromise.cancel.bind($resultPromise);
|
||||||
|
return $typingPromise;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function Update(item: $models.Post): Promise<$models.Post> & { cancel(): void } {
|
||||||
|
let $resultPromise = $Call.ByID(137798821, item) as any;
|
||||||
|
let $typingPromise = $resultPromise.then(($result: any) => {
|
||||||
|
return $$createType0($result);
|
||||||
|
}) as any;
|
||||||
|
$typingPromise.cancel = $resultPromise.cancel.bind($resultPromise);
|
||||||
|
return $typingPromise;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Private type creation functions
|
||||||
|
const $$createType0 = models$0.Post.createFrom;
|
||||||
|
const $$createType1 = $Create.Nullable($$createType0);
|
||||||
|
const $$createType2 = $Create.Array($$createType1);
|
||||||
@@ -1,101 +0,0 @@
|
|||||||
// @ts-check
|
|
||||||
// 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 {Call as $Call, Create as $Create} from "@wailsio/runtime";
|
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
||||||
// @ts-ignore: Unused imports
|
|
||||||
import * as models$0 from "../models/models.js";
|
|
||||||
|
|
||||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
||||||
// @ts-ignore: Unused imports
|
|
||||||
import * as $models from "./models.js";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @returns {Promise<number> & { cancel(): void }}
|
|
||||||
*/
|
|
||||||
export function Count() {
|
|
||||||
let $resultPromise = /** @type {any} */($Call.ByID(554487955));
|
|
||||||
return $resultPromise;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param {$models.PostType} item
|
|
||||||
* @returns {Promise<$models.PostType> & { cancel(): void }}
|
|
||||||
*/
|
|
||||||
export function Create(item) {
|
|
||||||
let $resultPromise = /** @type {any} */($Call.ByID(1092898136, item));
|
|
||||||
let $typingPromise = /** @type {any} */($resultPromise.then(($result) => {
|
|
||||||
return $$createType0($result);
|
|
||||||
}));
|
|
||||||
$typingPromise.cancel = $resultPromise.cancel.bind($resultPromise);
|
|
||||||
return $typingPromise;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param {number} id
|
|
||||||
* @returns {Promise<void> & { cancel(): void }}
|
|
||||||
*/
|
|
||||||
export function Delete(id) {
|
|
||||||
let $resultPromise = /** @type {any} */($Call.ByID(2114913543, id));
|
|
||||||
return $resultPromise;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @returns {Promise<($models.PostType | null)[]> & { cancel(): void }}
|
|
||||||
*/
|
|
||||||
export function GetAll() {
|
|
||||||
let $resultPromise = /** @type {any} */($Call.ByID(416231387));
|
|
||||||
let $typingPromise = /** @type {any} */($resultPromise.then(($result) => {
|
|
||||||
return $$createType2($result);
|
|
||||||
}));
|
|
||||||
$typingPromise.cancel = $resultPromise.cancel.bind($resultPromise);
|
|
||||||
return $typingPromise;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param {number} id
|
|
||||||
* @returns {Promise<$models.PostType | null> & { cancel(): void }}
|
|
||||||
*/
|
|
||||||
export function GetById(id) {
|
|
||||||
let $resultPromise = /** @type {any} */($Call.ByID(3237123344, id));
|
|
||||||
let $typingPromise = /** @type {any} */($resultPromise.then(($result) => {
|
|
||||||
return $$createType1($result);
|
|
||||||
}));
|
|
||||||
$typingPromise.cancel = $resultPromise.cancel.bind($resultPromise);
|
|
||||||
return $typingPromise;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param {{ [_: string]: string }} fieldsSortOrder
|
|
||||||
* @returns {Promise<($models.PostType | null)[]> & { cancel(): void }}
|
|
||||||
*/
|
|
||||||
export function SortedByOrder(fieldsSortOrder) {
|
|
||||||
let $resultPromise = /** @type {any} */($Call.ByID(1097313920, fieldsSortOrder));
|
|
||||||
let $typingPromise = /** @type {any} */($resultPromise.then(($result) => {
|
|
||||||
return $$createType2($result);
|
|
||||||
}));
|
|
||||||
$typingPromise.cancel = $resultPromise.cancel.bind($resultPromise);
|
|
||||||
return $typingPromise;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param {$models.PostType} item
|
|
||||||
* @returns {Promise<$models.PostType> & { cancel(): void }}
|
|
||||||
*/
|
|
||||||
export function Update(item) {
|
|
||||||
let $resultPromise = /** @type {any} */($Call.ByID(2773888269, item));
|
|
||||||
let $typingPromise = /** @type {any} */($resultPromise.then(($result) => {
|
|
||||||
return $$createType0($result);
|
|
||||||
}));
|
|
||||||
$typingPromise.cancel = $resultPromise.cancel.bind($resultPromise);
|
|
||||||
return $typingPromise;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Private type creation functions
|
|
||||||
const $$createType0 = models$0.PostType.createFrom;
|
|
||||||
const $$createType1 = $Create.Nullable($$createType0);
|
|
||||||
const $$createType2 = $Create.Array($$createType1);
|
|
||||||
74
frontend/bindings/app/internal/services/posttypeservice.ts
Normal file
74
frontend/bindings/app/internal/services/posttypeservice.ts
Normal file
@@ -0,0 +1,74 @@
|
|||||||
|
// 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 {Call as $Call, Create as $Create} from "@wailsio/runtime";
|
||||||
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||||
|
// @ts-ignore: Unused imports
|
||||||
|
import * as models$0 from "../models/models.js";
|
||||||
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||||
|
// @ts-ignore: Unused imports
|
||||||
|
import * as $models from "./models.js";
|
||||||
|
|
||||||
|
export function Count(): Promise<number> & { cancel(): void } {
|
||||||
|
let $resultPromise = $Call.ByID(554487955) as any;
|
||||||
|
return $resultPromise;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function Create(item: $models.PostType): Promise<$models.PostType> & { cancel(): void } {
|
||||||
|
let $resultPromise = $Call.ByID(1092898136, item) as any;
|
||||||
|
let $typingPromise = $resultPromise.then(($result: any) => {
|
||||||
|
return $$createType0($result);
|
||||||
|
}) as any;
|
||||||
|
$typingPromise.cancel = $resultPromise.cancel.bind($resultPromise);
|
||||||
|
return $typingPromise;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function Delete(id: number): Promise<void> & { cancel(): void } {
|
||||||
|
let $resultPromise = $Call.ByID(2114913543, id) as any;
|
||||||
|
return $resultPromise;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function GetAll(): Promise<($models.PostType | null)[]> & { cancel(): void } {
|
||||||
|
let $resultPromise = $Call.ByID(416231387) as any;
|
||||||
|
let $typingPromise = $resultPromise.then(($result: any) => {
|
||||||
|
return $$createType2($result);
|
||||||
|
}) as any;
|
||||||
|
$typingPromise.cancel = $resultPromise.cancel.bind($resultPromise);
|
||||||
|
return $typingPromise;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function GetById(id: number): Promise<$models.PostType | null> & { cancel(): void } {
|
||||||
|
let $resultPromise = $Call.ByID(3237123344, id) as any;
|
||||||
|
let $typingPromise = $resultPromise.then(($result: any) => {
|
||||||
|
return $$createType1($result);
|
||||||
|
}) as any;
|
||||||
|
$typingPromise.cancel = $resultPromise.cancel.bind($resultPromise);
|
||||||
|
return $typingPromise;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function SortedByOrder(fieldsSortOrder: { [_: string]: string }): Promise<($models.PostType | null)[]> & { cancel(): void } {
|
||||||
|
let $resultPromise = $Call.ByID(1097313920, fieldsSortOrder) as any;
|
||||||
|
let $typingPromise = $resultPromise.then(($result: any) => {
|
||||||
|
return $$createType2($result);
|
||||||
|
}) as any;
|
||||||
|
$typingPromise.cancel = $resultPromise.cancel.bind($resultPromise);
|
||||||
|
return $typingPromise;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function Update(item: $models.PostType): Promise<$models.PostType> & { cancel(): void } {
|
||||||
|
let $resultPromise = $Call.ByID(2773888269, item) as any;
|
||||||
|
let $typingPromise = $resultPromise.then(($result: any) => {
|
||||||
|
return $$createType0($result);
|
||||||
|
}) as any;
|
||||||
|
$typingPromise.cancel = $resultPromise.cancel.bind($resultPromise);
|
||||||
|
return $typingPromise;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Private type creation functions
|
||||||
|
const $$createType0 = models$0.PostType.createFrom;
|
||||||
|
const $$createType1 = $Create.Nullable($$createType0);
|
||||||
|
const $$createType2 = $Create.Array($$createType1);
|
||||||
@@ -11,7 +11,7 @@ type ExcelModule struct{}
|
|||||||
|
|
||||||
var ExcelService = application.NewService(&ExcelModule{})
|
var ExcelService = application.NewService(&ExcelModule{})
|
||||||
|
|
||||||
func ImportAllEntities() error {
|
func (s *ExcelModule) ImportAllEntities() error {
|
||||||
postTypeService := PostTypeService{}
|
postTypeService := PostTypeService{}
|
||||||
filepath, err := dialogs.OpenFileDialog("Импорт данных")
|
filepath, err := dialogs.OpenFileDialog("Импорт данных")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -41,7 +41,7 @@ func ImportAllEntities() error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func ExportAllEntities() error {
|
func (s *ExcelModule) ExportAllEntities() error {
|
||||||
postService := PostService{}
|
postService := PostService{}
|
||||||
exporter := excel.Exporter[Post]{
|
exporter := excel.Exporter[Post]{
|
||||||
SheetName: "Посты",
|
SheetName: "Посты",
|
||||||
|
|||||||
Reference in New Issue
Block a user