数据结构

因为没用到ts,所以以下定义了一些项目内常用的数据结构

首页房间结构

[{
    be_focused_user_id: 1,
    created_at: 1571459930,
    focused_user_id: 2,
    id: 59,
    is_alert: 1,
    room_uuid: "5daa935aaee07",
    save_action: 1,
    unread_number: 0,
    updated_at: 1572056530,
    users: {
        created_at: 1552467921,
        email: "584425430@qq.com",
        first_word: "Z",
        head_img: "http://127.0.0.1:501/uploads/5c88c7c09020d.png",
        id: 2,
        nick_name: "bbb",
        updated_at: 1571650186
    },
    be_users: {
        created_at: 1561985705,
        email: "584425439@qq.com",
        first_word: "Z",
        head_img: "http://127.0.0.1:501/uploads/5c88c32b34009.png",
        id: 1,
        nick_name: "zzzz",
        updated_at: 1572228155
    },
    room:{
        created_at: 1571459930,
        id: 107,
        last_msg: "{"msg": "<img src='static/icons/more/6.gif'><img src='static/icons/more/6.gif'>", "name": "zzzz", "user_id": 1, "type": 1, "head_img": "http://127.0.0.1:501/uploads/5c88c32b34009.png", "room_uuid": "5daa935aaee07", "created_at": 1572056525}",
        name: "",
        room_uuid: "5daa935aaee07",
        type: 0,
        updated_at: 1572056525,
        user_id: 2,
    }
}]

通讯录结构

同上

聊天数据结构

[{
    created_at:1572229953,
    head_img:"http://127.0.0.1:501/uploads/5c88c32b34009.png",
    id:3,
    msg:"1",
    name:"zzzz",
    room_uuid:"5d22d92668b11",
    save_action:0,
    send_status:1,
    type:1,
    user_id:1,
    uuid:"5d22d92668b1111572229953"
},{
    created_at:1572229970
    head_img:"http://127.0.0.1:501/uploads/5c88c32b34009.png"
    id:4
    msg:"11"
    name:"zzzz"
    room_uuid:"5d22d92668b11"
    save_action:0
    send_status:0
    type:1
    user_id:1
    uuid:"5d22d92668b1111572229970"

}]