交付 Windows 与 Web 端到端加密附件预览

This commit is contained in:
xhgit committed 2026-11-13 19:14:44 +08:00
1 parent d1efdedc57
commit c24960d22a
19 files changed
+421 -58

No files matched your search

@@ -0,0 +1,10 @@
CREATE TABLE device_attachments (
id uuid PRIMARY KEY,
sender_device uuid NOT NULL REFERENCES devices(id) ON DELETE CASCADE,
recipient_device uuid NOT NULL REFERENCES devices(id) ON DELETE CASCADE,
ciphertext bytea NOT NULL CHECK (octet_length(ciphertext) BETWEEN 16 AND 8388624),
created_at timestamptz NOT NULL DEFAULT now(),
CHECK (sender_device <> recipient_device)
);
CREATE INDEX device_attachments_expiry ON device_attachments(created_at);