add: full links api

This commit is contained in:
trisua 2025-06-24 16:34:55 -04:00
parent c2dbe2f114
commit ffdb767518
12 changed files with 532 additions and 4 deletions

View file

@ -27,3 +27,4 @@ pub const CREATE_TABLE_JOURNALS: &str = include_str!("./sql/create_journals.sql"
pub const CREATE_TABLE_NOTES: &str = include_str!("./sql/create_notes.sql");
pub const CREATE_TABLE_MESSAGE_REACTIONS: &str = include_str!("./sql/create_message_reactions.sql");
pub const CREATE_TABLE_INVITE_CODES: &str = include_str!("./sql/create_invite_codes.sql");
pub const CREATE_TABLE_LINKS: &str = include_str!("./sql/create_links.sql");

View file

@ -0,0 +1,10 @@
CREATE TABLE IF NOT EXISTS links (
id BIGINT NOT NULL PRIMARY KEY,
created BIGINT NOT NULL,
owner BIGINT NOT NULL,
label TEXT NOT NULL,
href TEXT NOT NULL,
upload_id BIGINT NOT NULL,
clicks INT NOT NULL,
position INT NOT NULL
)