feat: 添加密码管理功能,包括 API、数据库支持和前端界面

This commit is contained in:
2026-01-23 23:55:08 +08:00
parent 1a3bbac9ff
commit a8c96d84f0
43 changed files with 1957 additions and 110 deletions

View File

@@ -0,0 +1,17 @@
create table if not exists credentials (
id uuid primary key default gen_random_uuid(),
user_id uuid not null references users(id) on delete cascade,
site_origin text not null,
username text not null,
password_enc text not null,
password_iv text not null,
password_tag text not null,
created_at timestamptz not null default now(),
updated_at timestamptz not null default now()
);
create unique index if not exists idx_credentials_user_origin_username
on credentials (user_id, site_origin, username);
create index if not exists idx_credentials_user_origin
on credentials (user_id, site_origin);