add: some user api and all api desc

This commit is contained in:
wwweww
2026-02-27 19:17:01 +08:00
parent a0c720eb2f
commit 5930fb0dde
156 changed files with 9457 additions and 1086 deletions
+16
View File
@@ -0,0 +1,16 @@
CREATE TABLE user_preferences (
user_id BIGINT PRIMARY KEY REFERENCES users(id),
notification_order BOOLEAN DEFAULT TRUE,
notification_community BOOLEAN DEFAULT TRUE,
notification_system BOOLEAN DEFAULT TRUE,
theme VARCHAR(20) DEFAULT 'light',
language VARCHAR(10) DEFAULT 'zh-CN',
updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
CONSTRAINT chk_theme CHECK (theme IN ('light', 'dark', 'auto'))
);
CREATE TRIGGER trigger_preferences_updated_at
BEFORE UPDATE ON user_preferences
FOR EACH ROW
EXECUTE FUNCTION update_updated_at_column();