feat: excel service

This commit is contained in:
2025-03-13 14:16:50 +07:00
parent 3b7b62d31a
commit 76f28b4610
21 changed files with 606 additions and 397 deletions

View 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);