generate frontend entities

This commit is contained in:
opbnq-q
2025-03-09 08:07:26 -07:00
parent 447cc06876
commit c1dde79c7e
10 changed files with 318 additions and 35 deletions

View File

@@ -0,0 +1,36 @@
import {
GetAll,
Create,
Delete,
GetById,
Update,
Count,
} from "../../bindings/app/internal/services/commentservice.ts";
import type { Comment } from "../../bindings/app/internal/services";
import type { IService } from "../types/service.type.ts";
export default class CommentService implements IService<Comment> {
async read(id: number) {
return (await GetById(id)) as Comment;
}
async readAll() {
return (await GetAll()) as Comment[];
}
async create(item: Comment) {
await Create(item);
}
async delete(id: number) {
return await Delete(id);
}
async update(item: Comment) {
await Update(item);
}
async count() {
return await Count();
}
}