pipeline-app/pipeline_ops/models/pipeline_usage_log.json
yumoqing 9eccd08ffd feat: pipeline-app独立产线后端服务
3个业务模块:
- pipeline_core: 产线定义(pipelines/steps/versions)
- pipeline_ops: 运营(定价/供应量/使用记录)
- pipeline_dist: 分销(分销商/独立定价/API密钥)

- ahserver独立部署(端口9090)
- 独立数据库pipeline
- 80个文件, 符合module/db-table/crud三规范
2026-06-11 14:49:02 +08:00

25 lines
1.5 KiB
JSON

{
"summary": [{"name": "pipeline_usage_log", "title": "产线调用日志表", "primary": ["id"]}],
"fields": [
{"name": "id", "title": "主键", "type": "str", "length": 32, "nullable": "no"},
{"name": "pipeline_id", "title": "产线ID", "type": "str", "length": 32, "nullable": "no"},
{"name": "user_id", "title": "用户ID", "type": "str", "length": 32},
{"name": "distributor_id", "title": "分销商ID", "type": "str", "length": 32},
{"name": "call_count", "title": "调用次数", "type": "int", "default": "1"},
{"name": "token_input", "title": "输入Token数", "type": "int", "default": "0"},
{"name": "token_output", "title": "输出Token数", "type": "int", "default": "0"},
{"name": "amount", "title": "金额", "type": "double", "length": 15, "dec": 4, "default": "0"},
{"name": "status", "title": "状态", "type": "str", "length": 20},
{"name": "error_message", "title": "错误信息", "type": "text"},
{"name": "called_at", "title": "调用时间", "type": "timestamp"}
],
"indexes": [
{"name": "idx_usagelog_pipeline", "idxtype": "index", "idxfields": ["pipeline_id"]},
{"name": "idx_usagelog_called_at", "idxtype": "index", "idxfields": ["called_at"]},
{"name": "idx_usagelog_distributor", "idxtype": "index", "idxfields": ["distributor_id"]}
],
"codes": [
{"field": "pipeline_id", "table": "pipelines", "valuefield": "id", "textfield": "name"}
]
}