feat: Implement character avatar upload and refactor character form fields and API calls.

This commit is contained in:
liqupan
2026-02-02 22:48:11 +08:00
parent 6c32d845a7
commit dec5748cca
15 changed files with 369 additions and 197 deletions

View File

@@ -32,13 +32,10 @@ CREATE TABLE IF NOT EXISTS characters (
-- 基本信息
name TEXT NOT NULL, -- 角色名称
tagline TEXT, -- 角色标语/副标题
avatar_path TEXT, -- Storage 中的头像路径
description TEXT, -- 角色描述
-- 状态信息
compatibility REAL DEFAULT 0, -- 契合度 (0-100)
status TEXT DEFAULT 'online', -- 状态: online, busy, offline
is_locked BOOLEAN DEFAULT false, -- 是否锁定(会员限定)
is_active BOOLEAN DEFAULT true, -- 是否上架显示
sort_order INTEGER DEFAULT 0, -- 排序顺序
@@ -76,7 +73,6 @@ CREATE INDEX IF NOT EXISTS idx_tags_category ON tags(category_id);
CREATE INDEX IF NOT EXISTS idx_characters_active ON characters(is_active);
CREATE INDEX IF NOT EXISTS idx_characters_locked ON characters(is_locked);
CREATE INDEX IF NOT EXISTS idx_characters_status ON characters(status);
CREATE INDEX IF NOT EXISTS idx_characters_sort ON characters(sort_order);
CREATE INDEX IF NOT EXISTS idx_character_tags_character ON character_tags(character_id);