mirror of
https://github.com/michivonah/rss-reader.git
synced 2025-12-22 20:46:28 +01:00
plan db schema
This commit is contained in:
parent
cd549ae329
commit
a3d1e8a93a
4 changed files with 97 additions and 0 deletions
41
docs/erm/rss-reader_2025-04-30T19_35_20.850Z.dbml
Normal file
41
docs/erm/rss-reader_2025-04-30T19_35_20.850Z.dbml
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
Table user {
|
||||
id uuid [ pk, not null, unique ]
|
||||
mail text [ not null, unique ]
|
||||
active boolean [ not null, default: true ]
|
||||
}
|
||||
|
||||
Table feed {
|
||||
id uuid [ pk, not null, unique ]
|
||||
name text
|
||||
url text [ not null ]
|
||||
public boolean [ not null, default: false ]
|
||||
}
|
||||
|
||||
Table articles {
|
||||
id uuid [ pk, not null, unique ]
|
||||
title text [ not null ]
|
||||
description text
|
||||
site_url text [ not null ]
|
||||
image_url text
|
||||
publish_date timestamptz [ not null ]
|
||||
feed_id uuid [ not null ]
|
||||
}
|
||||
|
||||
Table user_to_feed {
|
||||
id integer [ pk, increment, not null, unique ]
|
||||
user_id uuid [ not null ]
|
||||
feed_id uuid [ not null ]
|
||||
owner boolean [ not null, default: False ]
|
||||
}
|
||||
|
||||
Ref fk_user_to_feed_user_id_user {
|
||||
user_to_feed.user_id > user.id [ delete: no action, update: no action ]
|
||||
}
|
||||
|
||||
Ref fk_user_to_feed_feed_id_feed {
|
||||
user_to_feed.feed_id > feed.id [ delete: no action, update: no action ]
|
||||
}
|
||||
|
||||
Ref fk_articles_feed_id_feed {
|
||||
articles.feed_id > feed.id [ delete: no action, update: no action ]
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue