-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathstories.txt
41 lines (23 loc) · 927 Bytes
/
stories.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/ BRAINSTORMING
FOR USERS:
as a user, I want to operate full CRUD on posts,
as a user, I want to up/downvote posts,
as a user, I want to log/sign{in|out} on the web app
FOR POSTS:
as a post, I need to have a title, content, upvotesCount, downvoteCount
as a post, I can have many comments
FOR COMMENTS:
as a comment, I need to have a content and an author and a host post
/ RELATIONSHIPS
as a user, I can have multiple posts
as a post, I can have only one author
as a post, I can have multiple comments
as a comment, I can belong to only one post and one author
/ CARDINALITIES
USER<1,N>POST
POST<1,N>COMMENT
USER<1,N>COMMENT
/ PRIMARY KEYS, FOREIGN KEYS SETUP:
POST table will have a FOREIGN KEY refrencing the PRIMARY KEY of the USER table.
COMMENT table will have a FOREIGN KEY refrencing the PRIMARY KEY of the USER table
COMMENT table will have a FOREIGN KEY refrencing the PRIMARY KEY of the POST table