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
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ Firebase database table structure
- [Recruiters](/recruiters)
- [Tasks](/tasks)
- [Trade-logs](/trade-logs)
- [Tags](/tags)
- [Transactions](/transactions)
- [Stocks](/stocks)
- [Users](/users)
- [UserTags](/userTags)
- [Wallets](/wallets)
11 changes: 0 additions & 11 deletions skills/README.md

This file was deleted.

9 changes: 9 additions & 0 deletions tags/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Tags

```
{
id: String,
type: String,
name: String
}
```
12 changes: 12 additions & 0 deletions userTags/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# User Tags
Firestore collection model for user related tags & its metadata

```
{
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
}

createdBy: String,
createdOn: Timestamp,
reason: String
}
```
1 change: 0 additions & 1 deletion users/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
'linkedin_id': string,
'twitter_id': string,
'instagram_id': string,
'skills': [],
'website': string,
'github_display_name': string,
'isMember': boolean,
Expand Down