add testimony api

This commit is contained in:
ItsMalma
2025-12-08 10:49:28 +07:00
parent a5794e9a1e
commit 0887b7c94b
7 changed files with 308 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
import type { Testimony } from "@/database/entities/testimony.entity";
import type { TestimonyResponse } from "@/modules/testimony/testimony.types";
export class TestimonyMapper {
public mapEntityToResponse(testimony: Testimony): TestimonyResponse {
return {
id: testimony.id,
review: testimony.review,
reviewer: testimony.reviewer,
rating: testimony.rating,
created_at: testimony.createdAt,
updated_at: testimony.updatedAt,
};
}
}