跳转至

数据结构

数据分类

  • 微信小程序storage保存数据
  • mongodb保存数据

微信小程序storage数据

  • token
openid
uid
exp
  • userinfo
{
    "avatarUrl": "",
    "birth_place": "四川省成都市双流区商业街18号",
    "birth_place_coordinate": "30.57447,103.92377",
    "city": "",
    "country": "",
    "date_of_birth": "2025-02-13",
    "gender": 1,
    "nickName": "微信用户",
    "number_uid": 23374882781,
    "openid": "oMIex7V_53qW8mga6f4WKjmluc_Y",
    "personal_location": "四川省成都市双流区迎春路三段110号",
    "personal_location_coordinate": "30.579365588553134,103.92016511108399",
    "phone_number": "",
    "province": "",
    "username": ""
}

  • allrelationshiptable
{
    number_uid : '',
    userinfo: {},
    x: '',  # Y坐标
    y: '',  # X坐标
    width: '',   # 总宽度 方便计算
    display: false,
    relationship:[{
        identity: ''
        number_uid: '',
        username: '',
        date_of_birth: '',
        x: '',
        y: '',
        width: '',
        verify_confirm: 0,
            relationship: [],
    }]
}

mongodb

  • userinfo 已注册用户表
{
    "number_uid": 23374882781,          # 主键
    "openid": "oMIex7V_53qW8mga6f4WKjmluc_Y",  # 主键
    "username": "",         # 用户名
    "surname": "",          # 姓
    "name": "",             # 名
    "nickName": "微信用户",
    "avatarUrl": "",
    "birth_place": "四川省成都市双流区商业街18号",
    "birth_place_coordinate": "30.57447,103.92377",
    "city": "",
    "country": "",
    "date_of_birth": "2025-02-13",
    "gender": 1,
    "personal_location": "四川省成都市双流区迎春路三段110号",
    "personal_location_coordinate": "30.579365588553134,103.92016511108399",
    "phone_number": "",
    "province": "",
    "privilege": []  # 权限
}
  • tmpuserinfo # 临时用户id
{
    "tmpuid": 23374882722,
    "username": "",         # 用户名
    "surname": "",          # 姓
    "username": "",
    "gender": 1,
    "date_of_birth": "",

}
  • relationships # 关系表
{
    "number_uid": ""
    "relationships": [
        {
            "identity": "mother",
            "number_uid": "",
            "verify_confirm": 0,
        },
        {
            "identity": "father",
            "number_uid": "",
            "verify_confirm": 1
        }
        {
            ......
        }
    ]
}