From the course: Nest.js Developer Lab 2026: Build a Robust API with Authentication, Articles, and User Profiles

Unlock this course with a free trial

Join today to access over 25,200 courses taught by industry experts.

Creating user entity

Creating user entity

In previous video, we prepared everything that we need to make our register request. Now, it's time to start working with user. Actually, we always must plan our application by entities. For example, we have an entity tag. In our case, it's even easier because we can always jump here inside our specification and check all entities that we must implement. In our case, for example, we have an entity user, later also profile, and so on. So now we want to create an entity user, and this means that we can operate with this entity. For example, we must create a table where we will store our users. Also, we can get user, of course, save user, this is registration, or maybe update current user. And in our case for this, we're doing exactly the same like we did inside tag. This is why I want here to open our tag entity on the right, and on the left inside user, I will create a new file user entity.ts. And this is where our user lives. And this is the entity by which TypeRM will create a table…

Contents