16 lines
457 B
TypeScript
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,
|
|
};
|
|
}
|
|
}
|