feat(points): 积分流水表支持时长显示,说明字段简化
后端: - PointTransaction 模型添加 duration 字段(float, nullable) - PointTransactionItem schema 添加 duration - consume() 新增 duration 参数,写入流水记录 - 各业务 description 统一简化为【脚本生成】【配音合成】等格式 - duration 类业务(tts/video)传入实际秒数 - Alembic 迁移: 95eb1a1c0af9_add_duration_to_point_transaction 前端: - PointTransaction 类型添加 duration - UsageDetail: 来源列 → 时长列(有值显示 xs,无值显示 -) - 说明列直接显示后端返回的简化描述
This commit is contained in:
@@ -82,7 +82,7 @@ async def polish_content(
|
||||
points=points,
|
||||
source_type="polish",
|
||||
source_id=f"polish_{current_user.id}_{asyncio.get_event_loop().time()}",
|
||||
description=f"润色 {request.polish_type}",
|
||||
description="【文案润色】",
|
||||
)
|
||||
await db.commit()
|
||||
|
||||
@@ -211,7 +211,7 @@ async def generate_title(
|
||||
points=points,
|
||||
source_type="title",
|
||||
source_id=f"title_{current_user.id}_{asyncio.get_event_loop().time()}",
|
||||
description=f"生成{request.title_type}标题",
|
||||
description="【标题生成】",
|
||||
)
|
||||
await db.commit()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user