From f2730853bd6ca7cd96033b94909614e27fcdcab2 Mon Sep 17 00:00:00 2001 From: Keuin Date: Thu, 24 Dec 2020 00:09:03 +0800 Subject: Nearly finished (but the db updating still fails) --- development.md | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 development.md (limited to 'development.md') diff --git a/development.md b/development.md new file mode 100644 index 0000000..d64223c --- /dev/null +++ b/development.md @@ -0,0 +1,33 @@ +# 数据库结构 + +基于MongoDB。 + +## Collection: logs + +```json +{ + "version": 1, // int + "subject": { + "uuid": player_uuid_bytes, // bytes + "id": player_id, // string + "pos": { + "world": world_id, // string + "x": pos_x, // float + "y": pos_y, // float + "z": pos_z, // float + } + }, + "action": BLOCK_BREAK | BLOCK_PLACE | BLOCK_USE | ENTITY_USE | ENTITY_ATTACK | ITEM_USE, // int + "object": { + "type": OBJECT_BLOCK | OBJECT_ENTITY, // int + "id": object_id, // string + "pos": { + "world": world_id, // string + "x": pos_x, // float + "y": pos_y, // float + "z": pos_z, // float + } + } +} +``` + -- cgit v1.2.3