Changes between Version 15 and Version 16 of ERModel


Ignore:
Timestamp:
08/24/26 15:02:26 (13 days ago)
Author:
211099
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ERModel

    v15 v16  
    3131* {{{user_id}}} – inherited primary key.
    3232[[BR]]
     33'''[[span(style=color: #9A0000, Attributes:)]]'''
     34* {{{assigned_at}}} – timestamp, required. Date and time when admin privileges were assigned.
     35[[BR]]
    3336'''[[span(style=color: #9A0000, Inheritance:)]]'''
    3437Inherits all attributes from USER.
     
    4346* {{{user_id}}} – inherited primary key.
    4447[[BR]]
     48'''[[span(style=color: #9A0000, Attributes:)]]'''
     49* {{{joined_at}}} – timestamp, required. Date and time when the user joined the platform.
     50[[BR]]
    4551'''[[span(style=color: #9A0000, Inheritance:)]]'''
    4652Inherits all attributes from USER
     
    5561* {{{user_id}}} – inherited primary key.
    5662[[BR]]
     63'''[[span(style=color: #9A0000, Attributes:)]]'''
     64* {{{bio}}} – ext, optional. Short biography of the writer.
    5765'''[[span(style=color: #9A0000, Inheritance:)]]'''
    5866Inherits all attributes from USER
     
    7381* {{{short_description}}} – text, required. Brief description of the story.
    7482* {{{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 over time.
     83*{{{status}}} – text, required. Publication status (draft, published, archived). A story has exactly one status at a time.
    7684* {{{image}}} – text, optional. URL or path to story cover image.
    7785[[BR]]
     
    137145* {{{content}}} – text, required. Content of the notification.
    138146* {{{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.
    140148* {{{is_read}}} – boolean, required. Indicates whether the notification has been read. Default: false.
    141149
     
    154162* {{{original_text}}} – text, required. Original text from the story.
    155163* {{{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.
    157165* {{{accepted}}} – boolean, required. Whether the suggestion was accepted.
    158166[[BR]]
     
    164172[[BR]]
    165173'''[[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.
    168178----
    169179
     
    221231[[BR]]
    222232'''[[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.
    225235[[BR]]
    226236----
     
    261271[[BR]]
    262272----
    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]]
     275Identifying relationship. Represents a user giving a like to a story.
     276[[BR]]
     277'''[[span(style=color: #9A0000, Cardinality:)]]'''
     2781:M (One user can give many likes, each like is given by exactly one user)
     279[[BR]]
     280'''[[span(style=color: #9A0000, Keys:)]]'''
     281Foreign key: {{{user_id}}} in LIKE references USER (part of composite key of LIKE).
     282[[BR]]
     283----
     284{{{for_story (LIKE – STORY)}}}
     285[[BR]]
     286Identifying relationship. Represents the story a like refers to.
     287[[BR]]
     288'''[[span(style=color: #9A0000, Cardinality:)]]'''
     289N:1 (One story can have many likes, each like refers to exactly one story)
     290[[BR]]
     291'''[[span(style=color: #9A0000, Keys:)]]'''
     292Foreign key: {{{story_id}}} in LIKE references STORY (part of composite key of LIKE).
    275293[[BR]]
    276294----
     
    289307----
    290308
    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]]
     311Represents notifications received by users.
     312[[BR]]
     313'''[[span(style=color: #9A0000, Cardinality:)]]'''
     3141:N (One user can receive many notifications, each notification belongs to exactly one user)
     315[[BR]]
     316'''[[span(style=color: #9A0000, Keys:)]]'''
     317Foreign key: {{{user_id}}} in NOTIFICATION references USER.
     318[[BR]]
     319----
     320{{{notify_about (NOTIFICATION – STORY)}}}
     321[[BR]]
     322Represents the story a notification refers to.
     323[[BR]]
     324'''[[span(style=color: #9A0000, Cardinality:)]]'''
     325N:1 (One story can generate many notifications, each notification refers to exactly one story)
     326[[BR]]
     327'''[[span(style=color: #9A0000, Keys:)]]'''
     328Foreign key: {{{story_id}}} in NOTIFICATION references STORY.
    303329[[BR]]
    304330----