Changes between Version 15 and Version 16 of ERModel
- Timestamp:
- 08/24/26 15:02:26 (13 days ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
ERModel
v15 v16 31 31 * {{{user_id}}} – inherited primary key. 32 32 [[BR]] 33 '''[[span(style=color: #9A0000, Attributes:)]]''' 34 * {{{assigned_at}}} – timestamp, required. Date and time when admin privileges were assigned. 35 [[BR]] 33 36 '''[[span(style=color: #9A0000, Inheritance:)]]''' 34 37 Inherits all attributes from USER. … … 43 46 * {{{user_id}}} – inherited primary key. 44 47 [[BR]] 48 '''[[span(style=color: #9A0000, Attributes:)]]''' 49 * {{{joined_at}}} – timestamp, required. Date and time when the user joined the platform. 50 [[BR]] 45 51 '''[[span(style=color: #9A0000, Inheritance:)]]''' 46 52 Inherits all attributes from USER … … 55 61 * {{{user_id}}} – inherited primary key. 56 62 [[BR]] 63 '''[[span(style=color: #9A0000, Attributes:)]]''' 64 * {{{bio}}} – ext, optional. Short biography of the writer. 57 65 '''[[span(style=color: #9A0000, Inheritance:)]]''' 58 66 Inherits all attributes from USER … … 73 81 * {{{short_description}}} – text, required. Brief description of the story. 74 82 * {{{content}}} – text, required. Full content of the story. 75 * {{{status}}} – multi-valued text, required. Publication status (draft, published, archived). A story can have multiple status values overtime.83 *{{{status}}} – text, required. Publication status (draft, published, archived). A story has exactly one status at a time. 76 84 * {{{image}}} – text, optional. URL or path to story cover image. 77 85 [[BR]] … … 137 145 * {{{content}}} – text, required. Content of the notification. 138 146 * {{{link}}} – text, required. Link 139 * {{{content_type}}} – multi-valued text, required. Type of notification content. A notification can belong to multiple content types.147 * {{{content_type}}} – text, required. Type of notification content. Each notification has exactly one content type. 140 148 * {{{is_read}}} – boolean, required. Indicates whether the notification has been read. Default: false. 141 149 … … 154 162 * {{{original_text}}} – text, required. Original text from the story. 155 163 * {{{suggested_text}}} – text, required. AI-suggested improvement. 156 * {{{suggestion_type}}} – multi-valued text, required. Type of suggestion (grammar, style, etc.). A suggestion can belong to multiple types.164 * {{{suggestion_type}}} – text, required. Type of suggestion (grammar, style, etc.). Each suggestion has exactly one type. 157 165 * {{{accepted}}} – boolean, required. Whether the suggestion was accepted. 158 166 [[BR]] … … 164 172 [[BR]] 165 173 '''[[span(style=color: #9A0000, Candidate keys:)]]''' 166 * Composite key: ({{{user_id}}}, {{{story_id}}}). 167 [[BR]] 174 * Composite key: ({{{user_id}}}, {{{story_id}}}) - inherited from the identifying relationships. 175 [[BR]] 176 '''[[span(style=color: #9A0000, Attributes:)]]''' 177 * {{{liked_at}}} - timestamp, required. Date and time when the like was given. 168 178 ---- 169 179 … … 221 231 [[BR]] 222 232 '''[[span(style=color: #9A0000, Attributes:)]]''' 223 * {{{role}}} – multi-valued text, required. Role of the collaborator.224 * {{{permission_level}}} – multi-valued numeric, optional. Level of permission for collaboration.233 * {{{role}}} - text, required. Role of the collaborator. Exactly one role per user per story. 234 * {{{permission_level}}} - numeric, optional. Level of permission. Exactly one level per user per story. 225 235 [[BR]] 226 236 ---- … … 261 271 [[BR]] 262 272 ---- 263 264 {{{is_liked (USER – LIKE – STORY)}}} 265 [[BR]] 266 Represents likes given by users to stories. 267 [[BR]] 268 '''[[span(style=color: #9A0000, Cardinality:)]]''' 269 User 1:N LIKE, Story 1:N LIKE (One user can like many stories, one story can have many likes) 270 [[BR]] 271 '''[[span(style=color: #9A0000, Keys:)]]''' 272 Composite key: (user_id, story_id) in LIKE 273 Foreign key: {{{user_id}}} in LIKE references USER. 274 Foreign key: {{{story_id in}}} LIKE references STORY. 273 {{{gives_like (USER – LIKE)}}} 274 [[BR]] 275 Identifying relationship. Represents a user giving a like to a story. 276 [[BR]] 277 '''[[span(style=color: #9A0000, Cardinality:)]]''' 278 1:M (One user can give many likes, each like is given by exactly one user) 279 [[BR]] 280 '''[[span(style=color: #9A0000, Keys:)]]''' 281 Foreign key: {{{user_id}}} in LIKE references USER (part of composite key of LIKE). 282 [[BR]] 283 ---- 284 {{{for_story (LIKE – STORY)}}} 285 [[BR]] 286 Identifying relationship. Represents the story a like refers to. 287 [[BR]] 288 '''[[span(style=color: #9A0000, Cardinality:)]]''' 289 N:1 (One story can have many likes, each like refers to exactly one story) 290 [[BR]] 291 '''[[span(style=color: #9A0000, Keys:)]]''' 292 Foreign key: {{{story_id}}} in LIKE references STORY (part of composite key of LIKE). 275 293 [[BR]] 276 294 ---- … … 289 307 ---- 290 308 291 {{{notify (USER – STORY – NOTIFICATION)}}} 292 [[BR]] 293 Represents notifications sent to users about stories. 294 [[BR]] 295 '''[[span(style=color: #9A0000, Cardinality:)]]''' 296 M:N:P (Many users can receive many notifications about many stories) 297 [[BR]] 298 '''[[span(style=color: #9A0000, Keys:)]]''' 299 Composite key: ({{{user_id}}},{{{story_id}}},{{{notification_id}}}) 300 Foreign key: {{{user_id}}} references USER 301 Foreign key: {{{story_id}}} references STORY. 302 Foreign key: {{{notification_id}}} references NOTIFICATION. 309 {{{receives (USER – NOTIFICATION)}}} 310 [[BR]] 311 Represents notifications received by users. 312 [[BR]] 313 '''[[span(style=color: #9A0000, Cardinality:)]]''' 314 1:N (One user can receive many notifications, each notification belongs to exactly one user) 315 [[BR]] 316 '''[[span(style=color: #9A0000, Keys:)]]''' 317 Foreign key: {{{user_id}}} in NOTIFICATION references USER. 318 [[BR]] 319 ---- 320 {{{notify_about (NOTIFICATION – STORY)}}} 321 [[BR]] 322 Represents the story a notification refers to. 323 [[BR]] 324 '''[[span(style=color: #9A0000, Cardinality:)]]''' 325 N:1 (One story can generate many notifications, each notification refers to exactly one story) 326 [[BR]] 327 '''[[span(style=color: #9A0000, Keys:)]]''' 328 Foreign key: {{{story_id}}} in NOTIFICATION references STORY. 303 329 [[BR]] 304 330 ----
