updated ERP

This commit is contained in:
Kai Ritthaler 2025-05-28 18:44:22 +02:00 committed by Rudi Regentonne
parent 78a40c35cb
commit b38dd31ed1
2 changed files with 17 additions and 4 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 201 KiB

After

Width:  |  Height:  |  Size: 277 KiB

Before After
Before After

View file

@ -1,7 +1,6 @@
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
Table follows {
@ -16,18 +15,28 @@ Table users {
role varchar
email string
password string
profile_picture integer
bio string
created_at timestamp
}
Table posts {
id integer [primary key]
title varchar
body text [note: 'Content of the post']
description varchar
user_id integer [not null]
status varchar
file string
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 {
id integer [primary key]
@ -55,6 +64,9 @@ Table post_tags {
Ref: post_tags.post_id > posts.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
@ -68,4 +80,5 @@ Ref: users.id < follows.following_user_id
Ref: users.id < follows.followed_user_id
```