-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
138 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,138 @@ | ||
@startuml | ||
|
||
entity UserAccounts { | ||
id: ID <<generated>> | ||
created_at: DateTime | ||
updated_at: DateTime | ||
ethereumAddress: Text | ||
} | ||
|
||
'if account type is managed by ethereum address then best way will be to store it in separate tables | ||
entity Reviewers { | ||
id: ID <<generated>> | ||
claimed: boolean | ||
-- | ||
ethereumAddress: Text <<FK>>/'(? depends on requirements)'/ | ||
} | ||
|
||
entity Moderators { | ||
id: ID <<generated>> | ||
-- | ||
ethereumAddress: Text <<FK>>/'(? depends on requirements)'/ | ||
} | ||
|
||
entity BlockedUsers { | ||
blocked_user_id: ID <<FK>> | ||
blocked_by_user_id: ID <<FK>> | ||
} | ||
|
||
entity Applications { | ||
id: ID <<generated>> | ||
created_at: DateTime | ||
updated_at: DateTime | ||
name: Text | ||
-- | ||
wave_id: ID <<FK>> | ||
user_id: ID <<FK>> | ||
category_id: ID <<FK>> | ||
} | ||
|
||
'private data of application | ||
entity ApplicationContacts { | ||
id: ID <<generated>> | ||
created_at: DateTime | ||
updated_at: DateTime | ||
name: Text | ||
email: Text | ||
-- | ||
application_id: ID <<FK>> | ||
|
||
} | ||
|
||
entity ApplicationCategories { | ||
id: ID <<generated>> | ||
name: Text | ||
} | ||
|
||
entity ApplicationSpam { | ||
application_id: ID <<FK>> | ||
user_id: ID <<FK>> | ||
} | ||
|
||
entity ApplicationValue { | ||
application_id: ID <<FK>> | ||
user_id: ID <<FK>> | ||
value: Number | ||
} | ||
|
||
entity Comments { | ||
id: ID <<generated>> | ||
created_at: DateTime | ||
updated_at: DateTime | ||
-- | ||
application_id: ID <<FK>> | ||
user_id: ID <<FK>> | ||
} | ||
|
||
entity CommentsSpam { | ||
comment_id: ID <<FK>> | ||
user_id: ID <<FK>> | ||
} | ||
|
||
entity CommentsHelpful { | ||
comment_id: ID <<FK>> | ||
user_id: ID <<FK>> | ||
} | ||
|
||
entity Reviews { | ||
comment_id: ID <<FK>> | ||
application_id: ID <<FK>> | ||
reviewer_id: ID <<FK>> | ||
|
||
PrimaryKey(reviewer_id, application_id) | ||
} | ||
|
||
entity Wave { | ||
id: ID <<generated>> | ||
created_at: DateTime | ||
updated_at: DateTime | ||
name: Text | ||
start_date: DateTime | ||
end_date: DateTime | ||
phase: WavePhase | ||
|
||
} | ||
|
||
Reviewers ||--o{ UserAccounts | ||
Moderators ||--o{ UserAccounts | ||
Applications ||--o{ Wave | ||
Applications ||--o{ UserAccounts | ||
Comments ||--o{ Applications | ||
Comments ||--o{ UserAccounts | ||
Reviews ||--o{ Comments | ||
Reviews ||--o{ Applications | ||
Reviews ||--o{ UserAccounts | ||
ApplicationContacts ||--o{ Applications | ||
BlockedUsers ||--o{ UserAccounts | ||
BlockedUsers ||--o{ UserAccounts | ||
Applications ||--o{ ApplicationCategories | ||
ApplicationSpam ||--o{ Applications | ||
ApplicationSpam ||--o{ UserAccounts | ||
CommentsSpam ||--o{ Comments | ||
CommentsSpam ||--o{ UserAccounts | ||
CommentsHelpful ||--o{ Comments | ||
CommentsHelpful ||--o{ UserAccounts | ||
ApplicationValue ||--o{ Applications | ||
ApplicationValue ||--o{ UserAccounts | ||
|
||
|
||
enum WavePhase { | ||
OPEN | ||
DENOISING | ||
ASSESEMENT | ||
CLOSED | ||
} | ||
|
||
WavePhase --o{ Wave | ||
|
||
@enduml |