39 lines
2.4 KiB
JSON
39 lines
2.4 KiB
JSON
{
|
||
"summary": [
|
||
{
|
||
"table": "world_sync_log",
|
||
"comment": "同步任务执行日志表(W-05 同步管理)",
|
||
"primary": ["id"]
|
||
}
|
||
],
|
||
"fields": [
|
||
{"name": "id", "type": "varchar(32)", "primary": true, "comment": "主键"},
|
||
{"name": "batch_id", "type": "varchar(32)", "comment": "同步批次号"},
|
||
{"name": "sync_code", "type": "varchar(64)", "comment": "同步编码"},
|
||
{"name": "sync_name", "type": "varchar(128)", "comment": "同步名称"},
|
||
{"name": "sync_type", "type": "varchar(16)", "default": "incremental", "comment": "同步类型:full/incremental(编码字典 sync_type)"},
|
||
{"name": "source_type", "type": "varchar(32)", "comment": "源数据类型:world/scene/entity"},
|
||
{"name": "source_id", "type": "varchar(32)", "comment": "源数据ID"},
|
||
{"name": "target_type", "type": "varchar(32)", "comment": "目标数据类型:world/scene/entity"},
|
||
{"name": "target_id", "type": "varchar(32)", "comment": "目标数据ID"},
|
||
{"name": "sync_status", "type": "varchar(16)", "default": "pending", "comment": "同步状态:pending/running/success/failed(编码字典 sync_status)"},
|
||
{"name": "total_count", "type": "int", "default": 0, "comment": "批次总条数"},
|
||
{"name": "success_count", "type": "int", "default": 0, "comment": "成功条数"},
|
||
{"name": "fail_count", "type": "int", "default": 0, "comment": "失败条数"},
|
||
{"name": "error_msg", "type": "text", "comment": "失败错误信息"},
|
||
{"name": "begin_time", "type": "datetime", "comment": "开始时间"},
|
||
{"name": "end_time", "type": "datetime", "comment": "结束时间"},
|
||
{"name": "created_at", "type": "datetime", "comment": "创建时间"},
|
||
{"name": "created_by", "type": "varchar(32)", "default": "0", "comment": "创建人"}
|
||
],
|
||
"indexes": [
|
||
{"name": "idx_batch_id", "fields": ["batch_id"], "comment": "批次号索引"},
|
||
{"name": "idx_status_created", "fields": ["sync_status", "created_at"], "comment": "状态+时间复合索引"},
|
||
{"name": "idx_source", "fields": ["source_type", "source_id"], "comment": "源类型+源ID索引"}
|
||
],
|
||
"codes": [
|
||
{"field": "sync_status", "table": "appcodes", "valuefield": "k", "textfield": "v", "condition": "parentid='sync_status'"},
|
||
{"field": "sync_type", "table": "appcodes", "valuefield": "k", "textfield": "v", "condition": "parentid='sync_type'"}
|
||
]
|
||
}
|