- 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
107 lines
2.0 KiB
JSON
107 lines
2.0 KiB
JSON
{
|
|
"summary": [
|
|
{
|
|
"name": "uapi_cache",
|
|
"title": "uapi定义缓存",
|
|
"primary": "id",
|
|
"classification": "cache"
|
|
}
|
|
],
|
|
"fields": [
|
|
{
|
|
"name": "id",
|
|
"type": "VARCHAR(32)",
|
|
"nullable": false,
|
|
"default": "",
|
|
"comment": "主键"
|
|
},
|
|
{
|
|
"name": "upappid",
|
|
"type": "VARCHAR(32)",
|
|
"nullable": false,
|
|
"default": "",
|
|
"comment": "上游应用ID"
|
|
},
|
|
{
|
|
"name": "apiname",
|
|
"type": "VARCHAR(128)",
|
|
"nullable": false,
|
|
"default": "",
|
|
"comment": "API名称"
|
|
},
|
|
{
|
|
"name": "method",
|
|
"type": "VARCHAR(16)",
|
|
"nullable": true,
|
|
"default": "POST",
|
|
"comment": "HTTP方法"
|
|
},
|
|
{
|
|
"name": "endpoint",
|
|
"type": "VARCHAR(512)",
|
|
"nullable": true,
|
|
"default": "",
|
|
"comment": "API端点"
|
|
},
|
|
{
|
|
"name": "auth_type",
|
|
"type": "VARCHAR(32)",
|
|
"nullable": true,
|
|
"default": "bearer",
|
|
"comment": "认证类型"
|
|
},
|
|
{
|
|
"name": "rate_limit",
|
|
"type": "INT",
|
|
"nullable": true,
|
|
"default": null,
|
|
"comment": "速率限制(次/分钟)"
|
|
},
|
|
{
|
|
"name": "description",
|
|
"type": "TEXT",
|
|
"nullable": true,
|
|
"default": null,
|
|
"comment": "API描述"
|
|
},
|
|
{
|
|
"name": "status",
|
|
"type": "VARCHAR(16)",
|
|
"nullable": false,
|
|
"default": "active",
|
|
"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_upappid_apiname",
|
|
"fields": [
|
|
"upappid",
|
|
"apiname"
|
|
],
|
|
"unique": true
|
|
},
|
|
{
|
|
"name": "idx_status",
|
|
"fields": [
|
|
"status"
|
|
],
|
|
"unique": false
|
|
}
|
|
],
|
|
"codes": []
|
|
} |