> For the complete documentation index, see [llms.txt](https://kinesis-school-of-programming.gitbook.io/nestjs-unleashed/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://kinesis-school-of-programming.gitbook.io/nestjs-unleashed/parallel-module-prisma/remaining-domain/logic/category.md).

# Category

Actually, the <mark style="color:blue;">`Category`</mark> logic will be identical to its respective part in the **Core module**. So, you may use that page as a guide, if you wish. But as a summary, we should

* Define its **CreateDTO** by copying the <mark style="color:blue;">`name`</mark> field from the users' **CreateDTO**
* Copy the contents of the <mark style="color:blue;">`UsersService`</mark> to its own **service** and adjust
* In <mark style="color:blue;">`findOne()`</mark>, fetch a <mark style="color:blue;">`category`</mark> with its <mark style="color:blue;">`products`</mark>
* In <mark style="color:blue;">`remove()`</mark>, check if the <mark style="color:blue;">`category`</mark> has associated <mark style="color:blue;">`products`</mark> before proceeding

<mark style="color:green;">**Commit**</mark> - Implementing category logic
