-
Notifications
You must be signed in to change notification settings - Fork 0
UML to Relations
Nantawan Paramapooti edited this page Dec 18, 2024
·
21 revisions
| Relation | Attribute | Foreign keys |
|---|---|---|
| Post | post_id user_id p_content timestamp filter_content |
user_id: User(user_id) |
| Follower | user_id follower_id notify |
user_id: User(user_id) follower_id: User(user_id) |
| Blocker | blocker_id blocked_id |
blocker_id: User(user_id) blocked_id: User(user_id) |
| User | user_id username password name bio profile header color language filter_content |
|
| UserChat | user_id chat_id |
user_id: User(user_id) chat_id: ChatRoom(chat_id) |
| ChatRoom | chat_id chat_name chat_owner profile |
|
| Message | message_id user_id chat_id ms_content timestamp |
user_id: User(user_id) chat_id: ChatRoom(chat_id) |
| Comment | comment_id user_id post_id c_content timestamp |
user_id: User(user_id) post_id: Post(post_id) |
| Tag | tag_id tag_content |
|
| PostTag | tag_id post_id |
tag_id: Tag(tag_id) post_id: Post(post_id) |
| Like | like_id user_id post_id like_type |
user_id: User(user_id) post_id: Post(post_id) |
| Share | share_id user_id post_id share_type |
post_id: Post(post_id) user_id: User(user_id) |
| Report | report_id report_of reporter_id report_type content |
report_of : Class object User, Post, Comment, Chatroom, Message reporter_id : User(user_id) |
| PostImage | postimage_id post_id image |
post_id : Post(post_id) |
| Notification | notification_id notification_of receiver_id is_read timestamp |
notification_of : Class object Follow, Like, Share, Post, Comment, Message receiver_id : User(user_id) |
| Interest | interest_id user_id tag_id |
user_id:User(user_id) tag_id:Tag(tag_id) |
| Disinterest | disinterest_id user_id tag_id |
user_id:User(user_id) tag_id:Tag(tag_id) |