@@ -128,6 +128,112 @@ ShortenerLaravelGraphQL provides a GraphQL API endpoint for creating short links
128
128
| ` resetPassword ` | Initiate the password reset process.
| ` { resetPassword(email: "[email protected] ") } ` |
129
129
| ` changePassword ` | Change the user's password. | ` { changePassword(userId: "user123", newPassword: "newpass123") } ` |
130
130
131
+ ## Database Scheme
132
+
133
+ ### Table: users
134
+ - ` id ` (Primary Key)
135
+ - ` username ` (Unique)
136
+ - ` email ` (Unique)
137
+ - ` password `
138
+ - ` created_at `
139
+ - ` updated_at `
140
+
141
+ ### Table: links
142
+ - ` id ` (Primary Key)
143
+ - ` user_id ` (Foreign Key to ` users ` )
144
+ - ` short_code ` (Unique)
145
+ - ` original_url `
146
+ - ` total_visits `
147
+ - ` created_at `
148
+ - ` updated_at `
149
+
150
+ ### Table: link_likes
151
+ - ` id ` (Primary Key)
152
+ - ` user_id ` (Foreign Key to ` users ` )
153
+ - ` link_id ` (Foreign Key to ` links ` )
154
+ - ` created_at `
155
+ - ` updated_at `
156
+
157
+ ### Table: link_comments
158
+ - ` id ` (Primary Key)
159
+ - ` user_id ` (Foreign Key to ` users ` )
160
+ - ` link_id ` (Foreign Key to ` links ` )
161
+ - ` text `
162
+ - ` created_at `
163
+ - ` updated_at `
164
+
165
+ ### Table: link_ratings
166
+ - ` id ` (Primary Key)
167
+ - ` user_id ` (Foreign Key to ` users ` )
168
+ - ` link_id ` (Foreign Key to ` links ` )
169
+ - ` rating `
170
+ - ` created_at `
171
+ - ` updated_at `
172
+
173
+ ### Table: link_flags
174
+ - ` id ` (Primary Key)
175
+ - ` user_id ` (Foreign Key to ` users ` )
176
+ - ` link_id ` (Foreign Key to ` links ` )
177
+ - ` reason `
178
+ - ` created_at `
179
+ - ` updated_at `
180
+
181
+ ### Table: link_reports
182
+ - ` id ` (Primary Key)
183
+ - ` user_id ` (Foreign Key to ` users ` )
184
+ - ` link_id ` (Foreign Key to ` links ` )
185
+ - ` issue `
186
+ - ` created_at `
187
+ - ` updated_at `
188
+
189
+ ### Table: categories
190
+ - ` id ` (Primary Key)
191
+ - ` name ` (Unique)
192
+ - ` created_at `
193
+ - ` updated_at `
194
+
195
+ ### Table: category_links
196
+ - ` id ` (Primary Key)
197
+ - ` category_id ` (Foreign Key to ` categories ` )
198
+ - ` link_id ` (Foreign Key to ` links ` )
199
+
200
+ ### Table: tags
201
+ - ` id ` (Primary Key)
202
+ - ` name ` (Unique)
203
+ - ` created_at `
204
+ - ` updated_at `
205
+
206
+ ### Table: link_tags
207
+ - ` id ` (Primary Key)
208
+ - ` tag_id ` (Foreign Key to ` tags ` )
209
+ - ` link_id ` (Foreign Key to ` links ` )
210
+
211
+ ### Table: notifications
212
+ - ` id ` (Primary Key)
213
+ - ` user_id ` (Foreign Key to ` users ` )
214
+ - ` message `
215
+ - ` read ` (Boolean)
216
+ - ` created_at `
217
+ - ` updated_at `
218
+
219
+ ### Table: user_sessions
220
+ - ` id ` (Primary Key)
221
+ - ` user_id ` (Foreign Key to ` users ` )
222
+ - ` token `
223
+ - ` created_at `
224
+ - ` updated_at `
225
+
226
+ ### Table: bookmarks
227
+ - ` id ` (Primary Key)
228
+ - ` user_id ` (Foreign Key to ` users ` )
229
+ - ` link_id ` (Foreign Key to ` links ` )
230
+
231
+ ### Table: subscriptions
232
+ - ` id ` (Primary Key)
233
+ - ` user_id ` (Foreign Key to ` users ` )
234
+ - ` created_at `
235
+ - ` updated_at `
236
+
131
237
## Contributing
132
238
133
239
Contributions are welcome! If you'd like to contribute to ShortenerLaravelGraphQL, please follow these steps:
0 commit comments