blob: be60bf5b4ae974acad34f571aa4127d4aee91f80 (
plain) (
tree)
|
|
# endpoints
## authentication
GET /login
POST /login
GET /signup
## user management
POST /users
GET /users
GET /users/:user
GET /users/:user/edit
PUT /users/:user
DELETE /users/:user
## board management
POST /boards
GET /boards
GET /boards/:board
GET /boards/:board/edit
PUT /boards/:board
DELETE /boards/:board
## pin management
POST /pins
GET /pins
GET /pins/:pin
GET /pins/:pin/edit
PUT /pins/:pin
DELETE /pins/:pin
## files
GET /files/:file
# structures
Enum Privacy {
Private
Unlisted
Public
}
User {
id int primary key
username string unique
email string unique
password string
bio text
site string
profile_picture string
privacy privacy
admin bool
}
board {
id int primary key
name string
description text
privacy privacy
}
board_ownership {
owner user_id
board board_id
primary key owner board
}
enum file_type {
image
audio
video
document
site
other
}
files {
id int primary key
thumbnail string (file path)
path string
type file_type
alt_text text
pin foreign key
}
// pins
pin {
id int primary key
subject text optional
text text
notes text
source_url string
}
tags {
tag
}
pin_tags {
ids many to many
}
pins_boards {
pin pin_id foreign
board board_id foreign
primary key pin board
}
pins_owners {
owner user_id
pin pin_id
primary key (owner, pin)
}
|