mirror of
https://github.com/bubblecup-12/VogelSocialMedia.git
synced 2025-07-06 15:18:48 +00:00
updated ERP
This commit is contained in:
parent
78a40c35cb
commit
b38dd31ed1
2 changed files with 17 additions and 4 deletions
BIN
code/db/ERP.png
BIN
code/db/ERP.png
Binary file not shown.
Before Width: | Height: | Size: 201 KiB After Width: | Height: | Size: 277 KiB |
|
@ -1,7 +1,6 @@
|
||||||
This is DBML Code. It can be edited and viewed on [dbdiagram.io](https://dbdiagram.io/d)
|
This is DBML Code. It can be edited and viewed on [dbdiagram.io](https://dbdiagram.io/d)
|
||||||
|
|
||||||
```
|
```
|
||||||
// Use DBML to define your database structure
|
|
||||||
// Docs: https://dbml.dbdiagram.io/docs
|
// Docs: https://dbml.dbdiagram.io/docs
|
||||||
|
|
||||||
Table follows {
|
Table follows {
|
||||||
|
@ -16,18 +15,28 @@ Table users {
|
||||||
role varchar
|
role varchar
|
||||||
email string
|
email string
|
||||||
password string
|
password string
|
||||||
|
profile_picture integer
|
||||||
|
bio string
|
||||||
created_at timestamp
|
created_at timestamp
|
||||||
}
|
}
|
||||||
|
|
||||||
Table posts {
|
Table posts {
|
||||||
id integer [primary key]
|
id integer [primary key]
|
||||||
title varchar
|
description varchar
|
||||||
body text [note: 'Content of the post']
|
|
||||||
user_id integer [not null]
|
user_id integer [not null]
|
||||||
status varchar
|
status varchar
|
||||||
file string
|
|
||||||
created_at timestamp
|
created_at timestamp
|
||||||
}
|
}
|
||||||
|
Table media {
|
||||||
|
id integer [primary key]
|
||||||
|
path string
|
||||||
|
created_at timestamp
|
||||||
|
}
|
||||||
|
|
||||||
|
Table post_media {
|
||||||
|
media_id integer
|
||||||
|
post_id integer
|
||||||
|
}
|
||||||
|
|
||||||
Table comments {
|
Table comments {
|
||||||
id integer [primary key]
|
id integer [primary key]
|
||||||
|
@ -55,6 +64,9 @@ Table post_tags {
|
||||||
Ref: post_tags.post_id > posts.id
|
Ref: post_tags.post_id > posts.id
|
||||||
Ref: post_tags.tag_id > tags.id
|
Ref: post_tags.tag_id > tags.id
|
||||||
|
|
||||||
|
Ref: post_media.post_id < posts.id
|
||||||
|
Ref: post_media.media_id < media.id
|
||||||
|
Ref: users.profile_picture < media.id
|
||||||
|
|
||||||
Ref: likes.user_id < users.id
|
Ref: likes.user_id < users.id
|
||||||
|
|
||||||
|
@ -68,4 +80,5 @@ Ref: users.id < follows.following_user_id
|
||||||
|
|
||||||
Ref: users.id < follows.followed_user_id
|
Ref: users.id < follows.followed_user_id
|
||||||
|
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue