Skip to content

Create user schema in mongoose #26

Description

@himanshusanecha

Creating a user schema in mongoose.

Parameters to be defined in user -

  1. Name
  2. Email
  3. Password
  4. Role
  5. news tags - this will include tags of the news that user wants to see, editable by user.
  6. subscribed - if true than we will send news mail letter to the user, else we will not.
  7. Anything necessary to manage authentication and authorization.

Roles will be of three types -

  1. User
  2. Publisher
  3. Admin
    Therefore create an enum check and set the default role to user.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions