1use std::collections::HashMap;
6
7use crate::models::{LevelInfo, Nameplate, OfficialVerify, Pendant};
8use serde::{Deserialize, Serialize};
9
10#[derive(Debug, Clone, Serialize, Deserialize)]
12pub struct Comment {
13 pub rpid: i64, pub oid: i64, #[serde(rename = "type")]
16 pub oid_type: i64, pub mid: i64, pub root: i64, pub parent: i64, pub dialog: i64, pub count: i64, pub rcount: i64, pub state: i64, pub fansgrade: i64, pub attr: i64, pub ctime: i64, pub like: i64, pub action: i64, pub member: Member, pub content: Content, pub up_action: UpAction, pub invisible: bool, pub reply_control: ReplyControl, pub folder: Folder, pub floor: Option<u64>,
37 pub show_follow: Option<bool>,
38 pub card_label: Option<Vec<CardLabel>>,
39 pub rpid_str: Option<String>,
40 pub root_str: Option<String>,
41 pub parent_str: Option<String>,
42 pub dialog_str: Option<String>,
43 pub mid_str: Option<String>,
44 pub oid_str: Option<String>,
45 pub replies: Option<Vec<Comment>>,
46 pub assist: Option<u64>,
47
48 pub dynamic_id_str: Option<String>,
49 pub note_cvid_str: Option<String>,
50 pub track_info: Option<String>,
51}
52
53#[derive(Debug, Clone, Serialize, Deserialize)]
55pub struct PageInfo {
56 pub num: u64, pub size: u64, pub count: u64, pub acount: Option<u64>, }
61
62#[derive(Debug, Clone, Serialize, Deserialize)]
64pub struct Member {
65 pub mid: String, pub uname: String, pub sex: String, pub sign: String, pub avatar: String, pub level_info: LevelInfo, pub pendant: Pendant, pub nameplate: Nameplate, pub official_verify: OfficialVerify, pub vip: Vip, #[serde(default)]
76 pub user_sailing: serde_json::Value, #[serde(default)]
78 pub is_contractor: bool, #[serde(default)]
80 pub contract_desc: String, pub rank: Option<String>,
83 pub display_rank: Option<String>,
84 pub fans_detail_a: Option<FansDetail>, pub following: Option<u64>, pub is_followed: Option<u64>, pub rank_b: Option<String>, pub face_nft_new: Option<i64>, pub senior: Option<JumpUrl>, pub fans_detail_b: Option<serde_json::Value>,
92 pub user_sailing_v2: Option<JumpUrl>, pub nft_interaction: Option<serde_json::Value>, pub avatar_item: Option<serde_json::Value>, }
96
97#[derive(Debug, Clone, Serialize, Deserialize)]
99#[serde(rename_all = "camelCase")]
100pub struct Vip {
101 pub vip_type: i64,
102 pub vip_due_date: i64,
103 pub due_remark: String,
104 pub access_status: i64,
105 pub vip_status: i64,
106 pub vip_status_warn: String,
107 pub theme_type: i64,
108 #[serde(rename = "avatar_subscript")]
109 pub avatar_subscript: i64,
110 #[serde(rename = "nickname_color")]
111 pub nickname_color: String,
112}
113
114#[derive(Debug, Clone, Serialize, Deserialize)]
118pub struct FansDetail {
119 pub uid: u64,
120 pub medal_id: u64,
121 pub medal_name: String,
122 pub score: Option<u64>,
123 pub level: u64,
124 pub intimacy: Option<u64>,
125 pub master_status: Option<u64>,
126 pub is_receive: Option<u64>,
127}
128
129#[derive(Debug, Clone, Serialize, Deserialize)]
131pub struct UserSailing {
132 pub pendant: Option<Pendant>,
133 pub cardbg: Option<CardBg>,
134 pub cardbg_with_focus: Option<()>, }
136
137#[derive(Debug, Clone, Serialize, Deserialize)]
139pub struct CardBg {
140 pub id: u64,
141 pub name: String,
142 pub image: String,
143 pub jump_url: Option<String>,
144 pub fan: Option<FanInfo>,
145 pub r#type: String, }
147
148#[derive(Debug, Clone, Serialize, Deserialize)]
150pub struct FanInfo {
151 pub is_fan: u64, pub number: u64,
153 pub color: String,
154 pub name: String,
155 pub num_desc: String,
156}
157
158#[derive(Debug, Clone, Serialize, Deserialize)]
160pub struct Content {
161 pub message: String,
162 pub members: Option<Vec<Member>>, pub jump_url: Option<HashMap<String, JumpUrl>>, pub max_line: Option<u64>,
165
166 pub plat: Option<u64>, pub device: Option<String>,
168 pub emote: Option<HashMap<String, Emote>>, pub pictures: Option<Vec<Picture>>,
170}
171
172#[derive(Debug, Clone, Serialize, Deserialize)]
174pub struct Emote {
175 pub id: u64, pub package_id: u64, pub state: u64, pub r#type: u64, pub attr: Option<u64>, pub text: String, pub url: String, pub meta: Option<EmoteMeta>, pub mtime: Option<u64>, pub jump_title: Option<String>, }
186
187#[derive(Debug, Clone, Serialize, Deserialize)]
188pub struct JumpUrl {
189 pub title: Option<String>, pub state: Option<u64>, pub prefix_icon: Option<String>, pub app_url_schema: Option<String>, pub app_name: Option<String>, pub app_package_name: Option<String>, pub click_report: Option<String>, }
197
198#[derive(Debug, Clone, Serialize, Deserialize)]
200pub struct EmoteMeta {
201 pub size: Option<u64>, pub alias: Option<String>, }
204
205#[derive(Debug, Clone, Serialize, Deserialize)]
207pub struct Picture {
208 pub img_src: String,
209 pub img_width: u64,
210 pub img_height: u64,
211 pub img_size: f64, }
213
214#[derive(Debug, Clone, Serialize, Deserialize)]
216pub struct Folder {
217 pub has_folded: bool,
218 pub is_folded: bool,
219 pub rule: String, }
221
222#[derive(Debug, Clone, Serialize, Deserialize)]
224pub struct UpAction {
225 pub like: bool,
226 pub reply: bool,
227}
228
229#[derive(Debug, Clone, Serialize, Deserialize)]
231pub struct CardLabel {
232 pub rpid: u64,
233 pub text_content: String,
234 pub text_color_day: String,
235 pub text_color_night: String,
236 pub label_color_day: String,
237 pub label_color_night: String,
238 pub image: Option<String>,
239 pub r#type: Option<u64>,
240 pub background: Option<String>,
241 pub background_width: Option<u64>,
242 pub background_height: Option<u64>,
243 pub jump_url: Option<String>,
244 pub effect: Option<u64>,
245 pub effect_start_time: Option<u64>,
246}
247
248#[derive(Debug, Clone, Serialize, Deserialize)]
250pub struct ReplyControl {
251 pub sub_reply_entry_text: Option<String>,
252 pub sub_reply_title_text: Option<String>,
253 pub time_desc: Option<String>,
254 pub location: Option<String>,
255}
256
257#[derive(Debug, Clone, Serialize, Deserialize)]
259pub struct Top {
260 pub admin: serde_json::Value,
261 pub upper: serde_json::Value,
262 pub vote: serde_json::Value,
263}
264
265#[derive(Debug, Clone, Serialize, Deserialize)]
266pub struct Config {
267 pub showtopic: u32,
268 pub show_up_flag: bool,
269 pub read_only: bool,
270}
271
272#[derive(Debug, Clone, Serialize, Deserialize)]
274pub struct Cursor {
275 pub is_begin: bool,
276 pub prev: i64,
277 pub next: i64,
278 pub is_end: bool,
279 pub pagination_reply: serde_json::Value,
280 pub session_id: String,
281 pub mode: i64,
282 pub mode_text: String,
283 pub all_count: i64,
284 pub support_mode: Vec<i64>,
285}
286
287#[derive(Debug, Clone, Serialize, Deserialize)]
289pub struct Upper {
290 pub mid: u64, }
292
293#[derive(Debug, Clone, Serialize, Deserialize)]
294pub struct Control {
295 pub input_disable: bool,
296 pub root_input_text: String,
297 pub child_input_text: String,
298 pub giveup_input_text: String,
299 pub screenshot_icon_state: i64,
300 pub upload_picture_icon_state: i64,
301 pub answer_guide_text: String,
302 pub answer_guide_icon_url: String,
303 pub answer_guide_ios_url: String,
304 pub answer_guide_android_url: String,
305 pub bg_text: String,
306 pub empty_page: Option<serde_json::Value>,
307 pub show_type: i64,
308 pub show_text: String,
309 pub web_selection: bool,
310 pub disable_jump_emote: bool,
311 pub enable_charged: bool,
312 pub enable_cm_biz_helper: bool,
313 pub preload_resources: Option<serde_json::Value>,
314}
315
316#[derive(Debug, Clone, Serialize, Deserialize)]
318pub struct CM {
319 pub id: i64,
320 pub contract_id: String,
321 pub pos_num: i64,
322 pub name: String,
323 pub pic: String,
324 pub litpic: String,
325 pub url: String,
326 pub style: i64,
327 pub agency: String,
328 pub label: String,
329 pub intro: String,
330 pub creative_type: i64,
331 pub request_id: String,
332 pub src_id: i64,
333 pub area: i64,
334 pub is_ad_loc: bool,
335 pub ad_cb: String,
336 pub title: String,
337 pub server_type: i64,
338 pub cm_mark: i64,
339 pub stime: i64,
340 pub mid: String,
341 pub activity_type: i64,
342 pub epid: i64,
343 pub sub_title: String,
344 pub ad_desc: String,
345 pub adver_name: String,
346 pub null_frame: bool,
347 pub pic_main_color: String,
348}