Files
goumrah-api/src/modules/testimony/testimony.mapper.ts
2025-12-08 10:49:28 +07:00

16 lines
457 B
TypeScript

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,
};
}
}