database work for permissions

main
june moretz 2023-05-09 03:04:48 -04:00
parent b6cff1d7b2
commit 89311c65b0
2 changed files with 39 additions and 0 deletions

View File

@ -19,6 +19,24 @@ CREATE TABLE threads (
foreign key(creator) references users(id) foreign key(creator) references users(id)
); );
CREATE TABLE permissions (
thread integer,
user integer,
type text,
flexible boolean,
permission text,
value text,
foreign key(user) references users(id),
foreign key(thread) references threads(id)
)
CREATE TABLE members (
thread integer,
user integer,
foreign key(user) references users(id),
foreign key(thread) references threads(id)
)
CREATE TABLE posts ( CREATE TABLE posts (
id integer primary key asc, id integer primary key asc,
user integer, user integer,

21
db/dbdocs.md Normal file
View File

@ -0,0 +1,21 @@
# notes on db fields
## permissions -> type
- user
- members
- everyone
## permissions -> permission
- manage_permissions
- add_users
- remove_users
- view
- post
## permissions -> value
for now just `true` or `false`
but leaving this open for the future if needed