- 36 files: module structure following module-development-spec - 7 table definitions: users_cache, pricing_cache, llmage_cache, uapi_cache, sync_state, customer_balance, accounting_records - Auth: dapi_auth + uapi_sign - Sync: base_sync + entity-specific sync modules (users/pricing/uapi/llmage) - Cache: LRU cache manager with TTL - API: balance, accounting, users, pricing, health handlers - Config: YAML config loader with env overrides - Utils: HTTP client, crypto helpers
127 lines
2.6 KiB
JSON
127 lines
2.6 KiB
JSON
{
|
||
"summary": [
|
||
{
|
||
"name": "pricing_cache",
|
||
"title": "定价数据缓存",
|
||
"primary": "id",
|
||
"classification": "cache"
|
||
}
|
||
],
|
||
"fields": [
|
||
{
|
||
"name": "id",
|
||
"type": "VARCHAR(32)",
|
||
"nullable": false,
|
||
"default": "",
|
||
"comment": "主键,对应 pricing_program id (ppid)"
|
||
},
|
||
{
|
||
"name": "llmid",
|
||
"type": "VARCHAR(32)",
|
||
"nullable": false,
|
||
"default": "",
|
||
"comment": "关联模型ID"
|
||
},
|
||
{
|
||
"name": "model_name",
|
||
"type": "VARCHAR(128)",
|
||
"nullable": true,
|
||
"default": "",
|
||
"comment": "模型名称"
|
||
},
|
||
{
|
||
"name": "pricing_type",
|
||
"type": "VARCHAR(32)",
|
||
"nullable": false,
|
||
"default": "",
|
||
"comment": "计费类型: token/image/video/audio"
|
||
},
|
||
{
|
||
"name": "input_price",
|
||
"type": "DECIMAL(10,6)",
|
||
"nullable": true,
|
||
"default": null,
|
||
"comment": "输入单价(每千token)"
|
||
},
|
||
{
|
||
"name": "output_price",
|
||
"type": "DECIMAL(10,6)",
|
||
"nullable": true,
|
||
"default": null,
|
||
"comment": "输出单价(每千token)"
|
||
},
|
||
{
|
||
"name": "unit_price",
|
||
"type": "DECIMAL(10,6)",
|
||
"nullable": true,
|
||
"default": null,
|
||
"comment": "统一单价(按次/按图/按分钟等)"
|
||
},
|
||
{
|
||
"name": "currency",
|
||
"type": "VARCHAR(8)",
|
||
"nullable": false,
|
||
"default": "CNY",
|
||
"comment": "货币单位"
|
||
},
|
||
{
|
||
"name": "status",
|
||
"type": "VARCHAR(16)",
|
||
"nullable": false,
|
||
"default": "active",
|
||
"comment": "状态: active/inactive/deprecated"
|
||
},
|
||
{
|
||
"name": "effective_from",
|
||
"type": "DATETIME",
|
||
"nullable": true,
|
||
"default": null,
|
||
"comment": "生效时间"
|
||
},
|
||
{
|
||
"name": "effective_to",
|
||
"type": "DATETIME",
|
||
"nullable": true,
|
||
"default": null,
|
||
"comment": "失效时间"
|
||
},
|
||
{
|
||
"name": "sync_version",
|
||
"type": "VARCHAR(32)",
|
||
"nullable": true,
|
||
"default": "",
|
||
"comment": "同步版本号"
|
||
},
|
||
{
|
||
"name": "cached_at",
|
||
"type": "DATETIME",
|
||
"nullable": false,
|
||
"default": "CURRENT_TIMESTAMP",
|
||
"comment": "缓存写入时间"
|
||
}
|
||
],
|
||
"idxfields": [
|
||
{
|
||
"name": "idx_llmid",
|
||
"fields": [
|
||
"llmid"
|
||
],
|
||
"unique": false
|
||
},
|
||
{
|
||
"name": "idx_pricing_type",
|
||
"fields": [
|
||
"pricing_type"
|
||
],
|
||
"unique": false
|
||
},
|
||
{
|
||
"name": "idx_status",
|
||
"fields": [
|
||
"status"
|
||
],
|
||
"unique": false
|
||
}
|
||
],
|
||
"codes": []
|
||
} |