This commit is contained in:
2025-03-07 20:41:21 +07:00
parent bf7037f4e8
commit 96b814d54a
52 changed files with 6643 additions and 782 deletions

View File

@@ -0,0 +1,27 @@
import { GetAll, Create, Delete, GetById, Update, Count } from "../../bindings/app/internal/services/postservice.ts"
import type { Post } from "../../bindings/app/internal/services/models.ts"
import type { IService } from "../types/service.type.ts"
export default class PostService implements IService<Post> {
async read(id: number) {
return await GetById(id)
}
async readAll() {
return await GetAll()
}
async create(item: Post) {
await Create(item)
}
async delete(id: number) {
return await Delete(id)
}
async update(item: Post) {
await Update(item)
}
async count() {
return await Count()
}
}