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));
|
||||
}
|
||||
}
|
||||
|
||||
101
frontend/bindings/app/internal/services/authorservice.js
Normal file
101
frontend/bindings/app/internal/services/authorservice.js
Normal file
@@ -0,0 +1,101 @@
|
||||
// @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);
|
||||
@@ -1,74 +0,0 @@
|
||||
// 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);
|
||||
101
frontend/bindings/app/internal/services/commentservice.js
Normal file
101
frontend/bindings/app/internal/services/commentservice.js
Normal file
@@ -0,0 +1,101 @@
|
||||
// @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);
|
||||
@@ -1,74 +0,0 @@
|
||||
// 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);
|
||||
@@ -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
|
||||
|
||||
@@ -10,13 +11,25 @@ import {Create as $Create} from "@wailsio/runtime";
|
||||
import * as models$0 from "../models/models.js";
|
||||
|
||||
export const Author = models$0.Author;
|
||||
export type Author = models$0.Author;
|
||||
|
||||
/**
|
||||
* @typedef {models$0.Author} Author
|
||||
*/
|
||||
|
||||
export const Comment = models$0.Comment;
|
||||
export type Comment = models$0.Comment;
|
||||
|
||||
/**
|
||||
* @typedef {models$0.Comment} Comment
|
||||
*/
|
||||
|
||||
export const Post = models$0.Post;
|
||||
export type Post = models$0.Post;
|
||||
|
||||
/**
|
||||
* @typedef {models$0.Post} Post
|
||||
*/
|
||||
|
||||
export const PostType = models$0.PostType;
|
||||
export type PostType = models$0.PostType;
|
||||
|
||||
/**
|
||||
* @typedef {models$0.PostType} PostType
|
||||
*/
|
||||
109
frontend/bindings/app/internal/services/postservice.js
Normal file
109
frontend/bindings/app/internal/services/postservice.js
Normal file
@@ -0,0 +1,109 @@
|
||||
// @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);
|
||||
@@ -1,79 +0,0 @@
|
||||
// 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 ExportToExcel(): Promise<void> & { cancel(): void } {
|
||||
let $resultPromise = $Call.ByID(75322242) 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);
|
||||
101
frontend/bindings/app/internal/services/posttypeservice.js
Normal file
101
frontend/bindings/app/internal/services/posttypeservice.js
Normal file
@@ -0,0 +1,101 @@
|
||||
// @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);
|
||||
@@ -1,79 +0,0 @@
|
||||
// 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 ImportFromExcel(): Promise<void> & { cancel(): void } {
|
||||
let $resultPromise = $Call.ByID(1671814244) as any;
|
||||
return $resultPromise;
|
||||
}
|
||||
|
||||
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);
|
||||
Reference in New Issue
Block a user