pbl_scense_ext/models/pbl_session_member.json

126 lines
2.9 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_session_member",
"title": "PBL 会话成员(复用 world_session,不污染基表)",
"primary": ["id"],
"catelog": "relation"
}
],
"fields": [
{
"name": "tenant_id",
"title": "租户ID(多租户强制打头,由应用层 tenant_scope 写入)",
"type": "str",
"length": 32,
"nullable": "no",
"default": "0"
},
{
"name": "id",
"title": "主键ID(应用层 getID/uniqueID 生成的32位字符串)",
"type": "str",
"length": 32,
"nullable": "no"
},
{
"name": "session_id",
"title": "会话ID(关联 world_session.id,以字符串存储避免跨库类型耦合)",
"type": "str",
"length": 32,
"nullable": "no"
},
{
"name": "user_id",
"title": "用户ID(rbac.user.id)",
"type": "str",
"length": 32,
"nullable": "no"
},
{
"name": "role_code",
"title": "会话内角色(teacher/learner/observer)",
"type": "str",
"length": 64,
"nullable": "no",
"default": "learner"
},
{
"name": "team_id",
"title": "团队ID(pbl_team.id,未分配为空)",
"type": "str",
"length": 32,
"nullable": "yes"
},
{
"name": "joined_at",
"title": "加入会话时间",
"type": "datetime",
"nullable": "yes"
},
{
"name": "last_seen_at",
"title": "最近心跳时间",
"type": "datetime",
"nullable": "yes"
},
{
"name": "state_version",
"title": "客户端已见状态版本(广播渲染去重水位)",
"type": "long",
"nullable": "no",
"default": "0"
},
{
"name": "status",
"title": "成员状态(active/left/banned)",
"type": "str",
"length": 64,
"nullable": "no",
"default": "active"
},
{
"name": "created_at",
"title": "创建时间(应用层 curDateString 写入)",
"type": "datetime",
"nullable": "no",
"default": "1970-01-01 00:00:00"
},
{
"name": "updated_at",
"title": "更新时间(应用层 curDateString 写入)",
"type": "datetime",
"nullable": "no",
"default": "1970-01-01 00:00:00"
}
],
"indexes": [
{
"name": "uk_sm",
"idxtype": "unique",
"idxfields": ["tenant_id", "session_id", "user_id"]
},
{
"name": "idx_sm_session_status",
"idxtype": "index",
"idxfields": ["tenant_id", "session_id", "status"]
}
],
"codes": [
{
"field": "role_code",
"table": "appcodes_kv",
"valuefield": "k",
"textfield": "v",
"cond": "parentid='pbl_session_role'"
},
{
"field": "status",
"table": "appcodes_kv",
"valuefield": "k",
"textfield": "v",
"cond": "parentid='pbl_member_status'"
}
]
}