ERD - KimGyuBek/Threadly GitHub Wiki
ERD
erDiagram
BASE_ENTITY {
datetime created_at
datetime modified_at
}
BASE_IMAGE_ENTITY {
string stored_file_name
string image_url
string status
datetime created_at
datetime modified_at
}
USERS {
string user_id
string user_name
string password
string email
string phone
string user_type
string status
boolean is_email_verified
boolean is_private
datetime created_at
datetime modified_at
}
USER_PROFILE {
string user_id
string nickname
string status_message
string bio
string gender
string profile_type
datetime created_at
datetime modified_at
}
USER_PROFILE_IMAGES {
string user_profile_image_id
string user_id
string stored_file_name
string image_url
string status
datetime created_at
datetime modified_at
}
POSTS {
string post_id
string user_id
string content
int view_count
string status
datetime created_at
datetime modified_at
}
POST_IMAGES {
string post_image_id
string post_id
int image_order
string stored_file_name
string image_url
string status
datetime created_at
datetime modified_at
}
POST_COMMENTS {
string comment_id
string post_id
string user_id
string content
string status
datetime created_at
datetime modified_at
}
POST_LIKES {
string post_id
string user_id
datetime created_at
}
COMMENT_LIKES {
string comment_id
string user_id
datetime created_at
}
USER_FOLLOWS {
string follow_id
string follower_id
string following_id
string status
datetime created_at
datetime modified_at
}
BASE_ENTITY ||--|| BASE_IMAGE_ENTITY : "extends"
BASE_ENTITY ||--|| USERS : "extends"
BASE_ENTITY ||--|| USER_PROFILE : "extends"
BASE_ENTITY ||--|| POSTS : "extends"
BASE_ENTITY ||--|| POST_COMMENTS : "extends"
BASE_ENTITY ||--|| USER_FOLLOWS : "extends"
BASE_IMAGE_ENTITY ||--|| USER_PROFILE_IMAGES : "extends"
BASE_IMAGE_ENTITY ||--|| POST_IMAGES : "extends"
USERS ||--|| USER_PROFILE : ""
USERS ||--o{ USER_PROFILE_IMAGES : ""
USERS ||--o{ POSTS : ""
POSTS ||--o{ POST_IMAGES : ""
USERS ||--o{ POST_COMMENTS : ""
POSTS ||--o{ POST_COMMENTS : ""
USERS ||--o{ POST_LIKES : ""
POSTS ||--o{ POST_LIKES : ""
USERS ||--o{ COMMENT_LIKES : ""
POST_COMMENTS ||--o{ COMMENT_LIKES : ""
USERS ||--o{ USER_FOLLOWS : ""