35 lines
1.9 KiB
JSON
35 lines
1.9 KiB
JSON
{
|
|
"summary": [
|
|
{
|
|
"name": "dbbackup_records",
|
|
"title": "数据库备份记录",
|
|
"primary": ["id"],
|
|
"catelog": "entity"
|
|
}
|
|
],
|
|
"fields": [
|
|
{"name": "id", "title": "记录ID", "type": "str", "length": 32, "nullable": "no"},
|
|
{"name": "job_id", "title": "备份任务", "type": "str", "length": 32},
|
|
{"name": "cluster_id", "title": "所属集群", "type": "str", "length": 32, "nullable": "no"},
|
|
{"name": "db_name", "title": "数据库名", "type": "str", "length": 128, "nullable": "no"},
|
|
{"name": "backup_type", "title": "备份类型", "type": "str", "length": 16},
|
|
{"name": "file_path", "title": "备份文件路径", "type": "str", "length": 512},
|
|
{"name": "file_size_mb", "title": "文件大小(MB)", "type": "int"},
|
|
{"name": "duration_sec", "title": "耗时(秒)", "type": "int"},
|
|
{"name": "checksum", "title": "校验和", "type": "str", "length": 128},
|
|
{"name": "status", "title": "状态", "type": "str", "length": 16, "nullable": "no", "default": "running"},
|
|
{"name": "error", "title": "错误信息", "type": "text"},
|
|
{"name": "started_at", "title": "开始时间", "type": "datetime"},
|
|
{"name": "completed_at", "title": "完成时间", "type": "datetime"}
|
|
],
|
|
"indexes": [
|
|
{"name": "idx_dbbak_rec_job", "idxtype": "index", "idxfields": ["job_id"]},
|
|
{"name": "idx_dbbak_rec_cluster", "idxtype": "index", "idxfields": ["cluster_id"]}
|
|
],
|
|
"codes": [
|
|
{"field": "backup_type", "table": "appcodes_kv", "valuefield": "k", "textfield": "v", "cond": "parentid='backup_type'"},
|
|
{"field": "status", "table": "appcodes_kv", "valuefield": "k", "textfield": "v", "cond": "parentid='backup_status'"},
|
|
{"field": "job_id", "table": "dbbackup_jobs", "valuefield": "id", "textfield": "job_name"}
|
|
]
|
|
}
|