summaryrefslogtreecommitdiff
path: root/development.md
blob: d64223c49539450e38afbda5852688176f775cb1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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
        }
    }
}
```