Skip to content

Commit

Permalink
Refactor(Mappers): Add some Mapper fields
Browse files Browse the repository at this point in the history
  • Loading branch information
Artur-Poffo committed Feb 15, 2024
1 parent a12bb0e commit cb3a7ef
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/infra/database/prisma/mappers/course-mapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ export class CourseMapper {
description: raw.description,
instructorId: new UniqueEntityID(raw.instructorId),
bannerImageKey: raw.bannerImageKey,
coverImageKey: raw.coverImageKey
coverImageKey: raw.coverImageKey,
createdAt: raw.createdAt
},
new UniqueEntityID(raw.id)
)
Expand Down
4 changes: 3 additions & 1 deletion src/infra/database/prisma/mappers/enrollment-mapeer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ export class EnrollmentMapper {
return Enrollment.create(
{
courseId: new UniqueEntityID(raw.courseId),
studentId: new UniqueEntityID(raw.userId)
studentId: new UniqueEntityID(raw.userId),
completedAt: raw.completedAt,
ocurredAt: raw.ocurredAt
},
new UniqueEntityID(raw.id)
)
Expand Down

0 comments on commit cb3a7ef

Please sign in to comment.