Startrekzky commented on issue #2361:
URL:
https://github.com/apache/incubator-devlake/issues/2361#issuecomment-1169616747
## Final Data Schema
Please take a look. @klesh @yumengwang03 @hezyin @liangjingyang
1. **table.accounts**
| field | type | length | description | key
|
| ----------------| -------- | --------- | ----------- | ------ |
| `id` | varchar | 255 | a user's `id` is
composed of "< Plugin >:< Entity >:< PK0 >[:PK1]..."<br/>For example, a Github
user's id is composed of "< github >:< GithubUsers >< GithubUserId)". Eg.
'github:GithubUsers:14050754' | PK |
| `email` | varchar | 255 | email of the account
| |
| `full_name` | varchar | 255 | full name | |
| `user_name` | varchar | 255 | username/nickname or Github
login of an account | |
| `avatar_url` | varchar | 255 | | |
| `organization` | varchar | 255 | organization or company
name | |
| `created_date` | datetime | 3 | account creation time
| |
| `deleted` | tinyint | | 0: default. The
user is active 1: the user is no longer active | |
2. **table.users**
| field | type | length | description | key|
| ------------- | ------- | --------- | ----------- | ------ |
| `id` | varchar | 255 | id of a person | PK |
| `email` | varchar | 255 | the primary email of a person | PK |
| `name` | varchar | 255 | name of a person | PK |
3. Output-3: a **table.user_accounts**
| field | type | length | description | key |
| ------------- | -------- | -------- | ----------- | -----|
| `user_id` | varchar | 255 | users.id | FK |
| `acccount_id` | varchar | 255 | accounts.id | FK
|
4. **table.teams**
| field | type | length | description | key
|
| ------------ | --------- | --------- | ----------- | ------ |
| `id` | varchar | 255 | id from the data
sources, decided by DevLake users | PK |
| `name` | varchar | 255 | name of the team. Eg.
team A, team B, etc. | PK |
| `alias` | varchar | 255 | alias or abbreviation
of a team | |
| `parent_id` | varchar | 255 | teams.id, default to null
| FK |
| `org_id` | varchar | 255 | the id of org_id, empty
for now. Would be used in the future | |
| `sorting_index` | int | 255 | the field to sort team | FK
|
5. **table.team_users**
| field | type | length | description | key
|
| ------------- | -------- | -------- | ----------- | ------ |
| `team_id` | varchar | 255 | Full name of the team. Eg.
team A, team B, etc. | PK |
| `user_id` | varchar | 255 | users.id | FK |
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]