-
Notifications
You must be signed in to change notification settings - Fork 13
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
base: main
Are you sure you want to change the base?
Conversation
``` | ||
{ | ||
userId: String, | ||
tagId: String, |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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": ""
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Refer #9
Description