pbl_runtime_ext/models/pbl_runtime_event.json

140 lines
2.5 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{
"summary": [
{
"name": "pbl_runtime_event",
"comment": "运行时事件append-only按月 RANGE 分区)",
"module": "pbl_runtime_ext",
"engine": "mariadb",
"charset": "utf8mb4",
"tenant_scoped": true
}
],
"fields": [
{
"name": "tenant_id",
"comment": "租户ID(强制打头)",
"null": false,
"type": "str",
"length": 32
},
{
"name": "id",
"comment": "主键",
"null": false,
"type": "int",
"length": 20,
"unsigned": true,
"auto_increment": true
},
{
"name": "event_uid",
"comment": "事件UID",
"null": false,
"type": "str",
"length": 32
},
{
"name": "session_id",
"comment": "会话",
"null": false,
"type": "bigint"
},
{
"name": "world_id",
"comment": "世界",
"null": false,
"type": "bigint"
},
{
"name": "actor_id",
"comment": "触发者",
"null": false,
"type": "str",
"length": 32
},
{
"name": "event_type",
"comment": "事件类型",
"null": false,
"type": "str",
"length": 64
},
{
"name": "payload_json",
"comment": "事件体",
"null": true,
"type": "json"
},
{
"name": "causation_id",
"comment": "因果链",
"null": false,
"type": "str",
"length": 32
},
{
"name": "state_version",
"comment": "状态版本",
"null": false,
"type": "bigint"
},
{
"name": "seq",
"comment": "会话内单调序号",
"null": false,
"type": "bigint"
},
{
"name": "occurred_at",
"comment": "发生时间",
"null": false,
"type": "datetime"
},
{
"name": "created_at",
"comment": "创建时间",
"null": false,
"type": "datetime"
},
{
"name": "updated_at",
"comment": "更新时间",
"null": false,
"type": "datetime"
}
],
"indexes": [
{
"name": "uk_re_uid",
"unique": true,
"fields": [
"tenant_id",
"event_uid",
"occurred_at"
]
},
{
"name": "idx_re_session_seq",
"unique": false,
"fields": [
"tenant_id",
"session_id",
"seq"
]
},
{
"name": "PRIMARY",
"unique": true,
"fields": [
"id"
]
}
],
"codes": [
{
"field": "event_type",
"appcode": "pbl_event_type"
}
]
}