bounswe / bounswe2022group2

18 stars 8 forks source link

Practice App: Create User Model #151

Closed bahricanyesil closed 2 years ago

bahricanyesil commented 2 years ago

Issue Description

We determined the endpoints to be included in the practice app project in our weekly meeting-9.

After the determination of the complete list, we divided the tasks within the team. I took the responsibility for the signup endpoint. To be able to implement the signup endpoint, we need to create a user model to use across the app. Because of this reason, I will create the user model.

Step Details

Steps that will be performed by using mongoose:

Final Actions

After I determined the properties and created the user model, I will create a PR, assign a reviewer, wait for the approval and integrate it into the project. After all, we will use this model, especially in the signup and login endpoints.

Deadline of the Issue

06.05.2022 - Friday - 23:59

Reviewer

Ezgi Aysel Batı

Deadline for the Review

07.05.2022 - Saturday - 23:59

bahricanyesil commented 2 years ago

Info

I determined the fields of the user model as follows:

  1. email --> type: String --> unique, required, lowercase, regex check
  2. password --> type: String --> required
  3. name --> type: String --> required
  4. createdAt (created automatically with timestamp)
  5. updatedAt (created automatically with timestamp)
bahricanyesil commented 2 years ago

Info

I created two validation functions with the help of the Joi package for the following endpoints:

  1. signup
  2. login
bahricanyesil commented 2 years ago

I completed all of the steps mentioned in the issue description. I opened a pull request and requested reviews of primarily @ezgy and additionally @egemenatikk.

Now, this issue is linked to PR #156 and will be automatically closed after the pull request is merged.

bahricanyesil commented 2 years ago

Final version of the user model is determined as follows with the addition of other teammates according to their needs while implementing some endpoints.

Screen Shot 2022-05-19 at 08 34 35