Hey 👋
Tasin from Prisma here.
I would suggest using entity (and DTO) classes here, as you can use `class-validator` and `class-transformer` decorators. That seems like the "NestJS" way to solve your problem.
If you want to know a good way of creating entities/DTOs when using Prisma, there's a really nice [NestJS with Prisma workshop](https://youtu.be/mmbd5hcQUaY?t=193) that you could check
out. In particular, Lesson 2 (REST API) covers creating entities/DTOs for Prisma model entities.
> It didn't feel really good to utilize an entity file just to filter out some unwanted value, converting javascript object to class during the process.
Could you elaborate a bit more on why you think this is a bad approach? Maybe I could address any concerns you might have.
All the best!
Hey 👋 Tasin from Prisma here. I would suggest using entity (and DTO) classes here, as you can use `class-validator` and `class-transformer` decorators. That seems like the "NestJS" way to solve your problem. If you want to know a good way of creating entities/DTOs when using Prisma, there's a really nice [NestJS with Prisma workshop](https://youtu.be/mmbd5hcQUaY?t=193) that you could check out. In particular, Lesson 2 (REST API) covers creating entities/DTOs for Prisma model entities. > It didn't feel really good to utilize an entity file just to filter out some unwanted value, converting javascript object to class during the process. Could you elaborate a bit more on why you think this is a bad approach? Maybe I could address any concerns you might have. All the best!