refactor(webui): migrate emoji routes from Peewee to SQLModel

- 完全迁移到 SQLModel,所有 DB 操作使用 get_db_session()
- 字段映射:image_hash → emoji_hash
- datetime 时间戳转换
- 移除 format/usage_count 字段
This commit is contained in:
DrSmoothl
2026-02-17 19:58:14 +08:00
parent 0ea18a4edc
commit 7da0811b5c
2 changed files with 334 additions and 269 deletions

View File

@@ -7,7 +7,6 @@ class EmojiResponse(BaseModel):
id: int
full_path: str
format: str
emoji_hash: str
description: str
query_count: int
@@ -16,7 +15,6 @@ class EmojiResponse(BaseModel):
emotion: Optional[str]
record_time: float
register_time: Optional[float]
usage_count: int
last_used_time: Optional[float]