Changes between Version 4 and Version 5 of P1
- Timestamp:
- 02/10/26 18:23:39 (6 weeks ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
P1
v4 v5 6 6 === ENTITIES === 7 7 8 {{{BASE_ENTITY}}}9 [[BR]]10 Abstract superclass that provides audit fields for all entities in the system.11 [[BR]]12 '''[[span(style=color: #9A0000, Note:)]]'''13 This is a mapped superclass and does not create a separate table. All attributes are inherited by child entities.14 [[BR]]15 '''[[span(style=color: #9A0000, Attributes:)]]'''16 * {{{created_at}}} – timestamp, required. Automatically set when entity is created.17 * {{{updated_at}}} – timestamp, optional. Automatically updated when entity is modified.18 [[BR]]19 '''[[span(style=color: #9A0000, Child entities:)]]'''20 All entities in the system inherit from BASE_ENTITY: USER, STORY, CHAPTER, GENRE, READING_LIST, NOTIFICATION, AI_SUGGESTION, LIKE, COMMENT.21 [[BR]]22 ----23 8 24 9 {{{USER}}} … … 28 13 '''[[span(style=color: #9A0000, Candidate keys:)]]''' 29 14 * {{{user_id}}} – numeric identifier (primary key). 30 [[BR]]31 '''[[span(style=color: #9A0000, Inherited attributes from BASE_ENTITY:)]]'''32 * {{{created_at}}} – timestamp, required.33 * {{{updated_at}}} – timestamp, optional.34 15 [[BR]] 35 16 '''[[span(style=color: #9A0000, Attributes:)]]''' … … 51 32 [[BR]] 52 33 '''[[span(style=color: #9A0000, Inheritance:)]]''' 53 Inherits all attributes from USER (including BASE_ENTITY attributes).34 Inherits all attributes from USER. 54 35 [[BR]] 55 36 ---- … … 63 44 [[BR]] 64 45 '''[[span(style=color: #9A0000, Inheritance:)]]''' 65 Inherits all attributes from USER (including BASE_ENTITY attributes).46 Inherits all attributes from USER 66 47 [[BR]] 67 48 ---- … … 75 56 [[BR]] 76 57 '''[[span(style=color: #9A0000, Inheritance:)]]''' 77 Inherits all attributes from USER (including BASE_ENTITY attributes).58 Inherits all attributes from USER 78 59 [[BR]] 79 60 ---- … … 81 62 {{{STORY}}} 82 63 [[BR]] 83 Represents every story that is written in the platform. '''Inherits from BASE_ENTITY.'''64 Represents every story that is written in the platform. 84 65 [[BR]] 85 66 '''[[span(style=color: #9A0000, Candidate keys:)]]''' 86 67 * {{{story_id}}} – surrogate numeric identifier (primary key). 87 [[BR]]88 '''[[span(style=color: #9A0000, Inherited attributes from BASE_ENTITY:)]]'''89 * {{{created_at}}} – timestamp, required.90 * {{{updated_at}}} – timestamp, optional.91 68 [[BR]] 92 69 '''[[span(style=color: #9A0000, Attributes:)]]''' … … 102 79 {{{CHAPTER}}} 103 80 [[BR]] 104 Represents a chapter, which is part of a story. '''Inherits from BASE_ENTITY.'''81 Represents a chapter, which is part of a story. 105 82 [[BR]] 106 83 '''[[span(style=color: #9A0000, Candidate keys:)]]''' 107 84 * {{{chapter_id}}} – surrogate numeric identifier (primary key). 108 [[BR]]109 '''[[span(style=color: #9A0000, Inherited attributes from BASE_ENTITY:)]]'''110 * {{{created_at}}} – timestamp, required.111 * {{{updated_at}}} – timestamp, optional.112 85 [[BR]] 113 86 '''[[span(style=color: #9A0000, Attributes:)]]''' … … 125 98 {{{GENRE}}} 126 99 [[BR]] 127 Represents a genre category for stories. '''Inherits from BASE_ENTITY.'''100 Represents a genre category for stories. 128 101 [[BR]] 129 102 '''[[span(style=color: #9A0000, Candidate keys:)]]''' 130 103 * {{{genre_id}}} – surrogate numeric identifier (primary key). 131 [[BR]]132 '''[[span(style=color: #9A0000, Inherited attributes from BASE_ENTITY:)]]'''133 * {{{created_at}}} – timestamp, required.134 * {{{updated_at}}} – timestamp, optional.135 104 [[BR]] 136 105 '''[[span(style=color: #9A0000, Attributes:)]]''' … … 142 111 {{{READING_LIST}}} 143 112 [[BR]] 144 Represents a reading list created by users. '''Inherits from BASE_ENTITY.'''113 Represents a reading list created by users. 145 114 [[BR]] 146 115 '''[[span(style=color: #9A0000, Candidate keys:)]]''' 147 116 * {{{list_id}}} – surrogate numeric identifier (primary key). 148 [[BR]]149 '''[[span(style=color: #9A0000, Inherited attributes from BASE_ENTITY:)]]'''150 * {{{created_at}}} – timestamp, required.151 * {{{updated_at}}} – timestamp, optional.152 117 [[BR]] 153 118 '''[[span(style=color: #9A0000, Attributes:)]]''' … … 161 126 {{{NOTIFICATION}}} 162 127 [[BR]] 163 Represents notifications sent to users. '''Inherits from BASE_ENTITY.'''128 Represents notifications sent to users. 164 129 [[BR]] 165 130 '''[[span(style=color: #9A0000, Candidate keys:)]]''' 166 131 * {{{notification_id}}} – surrogate numeric identifier (primary key). 167 [[BR]]168 '''[[span(style=color: #9A0000, Inherited attributes from BASE_ENTITY:)]]'''169 * {{{created_at}}} – timestamp, required.170 * {{{updated_at}}} – timestamp, optional.171 132 [[BR]] 172 133 '''[[span(style=color: #9A0000, Attributes:)]]''' … … 179 140 {{{AI_SUGGESTION}}} 180 141 [[BR]] 181 Represents AI-generated suggestions for story improvements. '''Inherits from BASE_ENTITY.'''142 Represents AI-generated suggestions for story improvements. 182 143 [[BR]] 183 144 '''[[span(style=color: #9A0000, Candidate keys:)]]''' 184 145 * {{{suggestion_id}}} – surrogate numeric identifier (primary key). 185 [[BR]]186 '''[[span(style=color: #9A0000, Inherited attributes from BASE_ENTITY:)]]'''187 * {{{created_at}}} – timestamp, required.188 * {{{updated_at}}} – timestamp, optional.189 146 [[BR]] 190 147 '''[[span(style=color: #9A0000, Attributes:)]]''' … … 199 156 {{{LIKE}}} 200 157 [[BR]] 201 Represents likes given by users to stories. '''Inherits from BASE_ENTITY.'''158 Represents likes given by users to stories. 202 159 [[BR]] 203 160 '''[[span(style=color: #9A0000, Candidate keys:)]]''' 204 161 * Composite key: ({{{user_id}}}, {{{story_id}}}). 205 162 [[BR]] 206 '''[[span(style=color: #9A0000, Inherited attributes from BASE_ENTITY:)]]'''207 * {{{created_at}}} – timestamp, required.208 * {{{updated_at}}} – timestamp, optional.209 [[BR]]210 163 ---- 211 164 212 165 {{{COMMENT}}} 213 166 [[BR]] 214 Represents comments made by users on stories. '''Inherits from BASE_ENTITY.'''167 Represents comments made by users on stories. 215 168 [[BR]] 216 169 '''[[span(style=color: #9A0000, Candidate keys:)]]''' 217 170 * {{{comment_id}}} – surrogate numeric identifier (primary key). 218 [[BR]]219 '''[[span(style=color: #9A0000, Inherited attributes from BASE_ENTITY:)]]'''220 * {{{created_at}}} – timestamp, required.221 * {{{updated_at}}} – timestamp, optional.222 171 [[BR]] 223 172 '''[[span(style=color: #9A0000, Attributes:)]]'''
