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
34
35
36
37
38
39
40
41
42
43
use crate::protocol::protobuf::{ChannelMsg, GuildNode};

#[derive(Clone, Debug, Default)]
pub struct FirstViewResponse {
    pub guild_count: u32,
    pub self_tinyid: u64,
    pub direct_message_switch: u32,
    pub direct_message_guild_count: u32,
}

#[derive(Clone, Debug, Default)]
pub struct FirstViewMessage {
    pub push_flag: u32,
    pub guild_nodes: Vec<GuildNode>,
    pub channel_msgs: Vec<ChannelMsg>,
    pub get_msg_time: u64,
    pub direct_message_guild_nodes: Vec<GuildNode>,
}

#[derive(Clone, Debug, Default)]
pub struct FirstView {
    pub response: FirstViewResponse,
    pub message: FirstViewMessage,
}

#[derive(Clone, Debug, Default)]
pub struct GuildUserProfile {
    pub tiny_id: u64,
    pub nickname: String,
    pub avatar_url: String,
    pub join_time: i64,
}

#[derive(Clone, Debug, Default)]
pub struct GuildSelfProfile {
    pub tiny_id: u64,
    pub nickname: String,
    pub avatar_url: String,
}

pub mod protobuf {
    include!(concat!(env!("OUT_DIR"), "/", "guild.rs"));
}