Category
We'll create the Category
resource following the same protocol.
Define the entity's attributes.
Then, execute the necessary steps to finish assembling the new resource
In the controller, use the
IdDto
whereverid
is being usedRemove the number conversion operator (
+
) below each occurrenceUse
PaginationDto
in thefindAll()
method (and also in the service)Default page size - 30
Add to the entity the ORM decorators (
@Entity()
,@Column()
, etc)Define
name
asunique
Register the entity inside the
TypeOrmModule
in the resource's own module
Generate and run the migration create-category, as we cannot define the relations yet.
Commit - Creating category entity
Last updated