Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Tag & UserTags model #11

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

Mir-SA
Copy link
Contributor

@Mir-SA Mir-SA commented Sep 24, 2022

Refer #9

Description

  • Adds tag & usertag model
  • Removes older skills model & skills property from user model

```
{
userId: String,
tagId: String,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can this be an array, because there can be multiple tags?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i'm thinking of storing it as "react": ""

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why we would store empty strings inside the key?

Copy link
Contributor Author

@Mir-SA Mir-SA Sep 25, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it can be 1 of 2 ways.

  • create series of tags(tag1, tag2) as key & store values in it
    • with this approach we'll need key(tag1..) to get the id
    • we will have to store this key on tag model
  • store value as key with empty string
    • with this approach we can fetch document and get all keys(tagid) off the object

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we will take approach as it was discussed in call to create a new doc for every user tag along with their id
e.g.

doc1: {
    userid: user123,
    tagid: fdhjewuih3
},
doc2: {
    userid: user123,
    tagid: fdwjk2
}

@vinayak-trivedi vinayak-trivedi added the enhancement Improving something existing label Sep 26, 2022
Copy link
Member

@vinayak-trivedi vinayak-trivedi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improving something existing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants