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<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, pub user_sailing: serde_json::Value, pub is_contractor: bool, pub contract_desc: String, pub rank: Option<String>,
80 pub display_rank: Option<String>,
81 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>,
89 pub user_sailing_v2: Option<JumpUrl>, pub nft_interaction: Option<serde_json::Value>, pub avatar_item: Option<serde_json::Value>, }
93
94#[derive(Debug, Clone, Serialize, Deserialize)]
96#[serde(rename_all = "camelCase")]
97pub struct Vip {
98 pub vip_type: i64,
99 pub vip_due_date: i64,
100 pub due_remark: String,
101 pub access_status: i64,
102 pub vip_status: i64,
103 pub vip_status_warn: String,
104 pub theme_type: i64,
105 #[serde(rename = "avatar_subscript")]
106 pub avatar_subscript: i64,
107 #[serde(rename = "nickname_color")]
108 pub nickname_color: String,
109}
110
111#[derive(Debug, Clone, Serialize, Deserialize)]
115pub struct FansDetail {
116 pub uid: u64,
117 pub medal_id: u64,
118 pub medal_name: String,
119 pub score: Option<u64>,
120 pub level: u64,
121 pub intimacy: Option<u64>,
122 pub master_status: Option<u64>,
123 pub is_receive: Option<u64>,
124}
125
126#[derive(Debug, Clone, Serialize, Deserialize)]
128pub struct UserSailing {
129 pub pendant: Option<Pendant>,
130 pub cardbg: Option<CardBg>,
131 pub cardbg_with_focus: Option<()>, }
133
134#[derive(Debug, Clone, Serialize, Deserialize)]
136pub struct CardBg {
137 pub id: u64,
138 pub name: String,
139 pub image: String,
140 pub jump_url: Option<String>,
141 pub fan: Option<FanInfo>,
142 pub r#type: String, }
144
145#[derive(Debug, Clone, Serialize, Deserialize)]
147pub struct FanInfo {
148 pub is_fan: u64, pub number: u64,
150 pub color: String,
151 pub name: String,
152 pub num_desc: String,
153}
154
155#[derive(Debug, Clone, Serialize, Deserialize)]
157pub struct Content {
158 pub message: String,
159 pub members: Option<Vec<Member>>, pub jump_url: Option<HashMap<String, JumpUrl>>, pub max_line: Option<u64>,
162
163 pub plat: Option<u64>, pub device: Option<String>,
165 pub emote: Option<HashMap<String, Emote>>, pub pictures: Option<Vec<Picture>>,
167}
168
169#[derive(Debug, Clone, Serialize, Deserialize)]
171pub struct Emote {
172 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>, }
183
184#[derive(Debug, Clone, Serialize, Deserialize)]
185pub struct JumpUrl {
186 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>, }
194
195#[derive(Debug, Clone, Serialize, Deserialize)]
197pub struct EmoteMeta {
198 pub size: Option<u64>, pub alias: Option<String>, }
201
202#[derive(Debug, Clone, Serialize, Deserialize)]
204pub struct Picture {
205 pub img_src: String,
206 pub img_width: u64,
207 pub img_height: u64,
208 pub img_size: u64, }
210
211#[derive(Debug, Clone, Serialize, Deserialize)]
213pub struct Folder {
214 pub has_folded: bool,
215 pub is_folded: bool,
216 pub rule: String, }
218
219#[derive(Debug, Clone, Serialize, Deserialize)]
221pub struct UpAction {
222 pub like: bool,
223 pub reply: bool,
224}
225
226#[derive(Debug, Clone, Serialize, Deserialize)]
228pub struct CardLabel {
229 pub rpid: u64,
230 pub text_content: String,
231 pub text_color_day: String,
232 pub text_color_night: String,
233 pub label_color_day: String,
234 pub label_color_night: String,
235 pub image: Option<String>,
236 pub r#type: Option<String>,
237 pub background: Option<String>,
238 pub background_width: Option<u64>,
239 pub background_height: Option<u64>,
240 pub jump_url: Option<String>,
241 pub effect: Option<u64>,
242 pub effect_start_time: Option<u64>,
243}
244
245#[derive(Debug, Clone, Serialize, Deserialize)]
247pub struct ReplyControl {
248 pub sub_reply_entry_text: Option<String>,
249 pub sub_reply_title_text: Option<String>,
250 pub time_desc: Option<String>,
251 pub location: Option<String>,
252}
253
254#[derive(Debug, Clone, Serialize, Deserialize)]
256pub struct Top {
257 pub admin: serde_json::Value,
258 pub upper: serde_json::Value,
259 pub vote: serde_json::Value,
260}
261
262#[derive(Debug, Clone, Serialize, Deserialize)]
263pub struct Config {
264 pub showtopic: u32,
265 pub show_up_flag: bool,
266 pub read_only: bool,
267}
268
269#[derive(Debug, Clone, Serialize, Deserialize)]
271pub struct Cursor {
272 pub is_begin: bool,
273 pub prev: i64,
274 pub next: i64,
275 pub is_end: bool,
276 pub pagination_reply: serde_json::Value,
277 pub session_id: String,
278 pub mode: i64,
279 pub mode_text: String,
280 pub all_count: i64,
281 pub support_mode: Vec<i64>,
282}
283
284#[derive(Debug, Clone, Serialize, Deserialize)]
286pub struct Upper {
287 pub mid: u32,
288}
289
290#[derive(Debug, Clone, Serialize, Deserialize)]
291pub struct Control {
292 pub input_disable: bool,
293 pub root_input_text: String,
294 pub child_input_text: String,
295 pub giveup_input_text: String,
296 pub screenshot_icon_state: i64,
297 pub upload_picture_icon_state: i64,
298 pub answer_guide_text: String,
299 pub answer_guide_icon_url: String,
300 pub answer_guide_ios_url: String,
301 pub answer_guide_android_url: String,
302 pub bg_text: String,
303 pub empty_page: Option<serde_json::Value>,
304 pub show_type: i64,
305 pub show_text: String,
306 pub web_selection: bool,
307 pub disable_jump_emote: bool,
308 pub enable_charged: bool,
309 pub enable_cm_biz_helper: bool,
310 pub preload_resources: Option<serde_json::Value>,
311}
312
313#[derive(Debug, Clone, Serialize, Deserialize)]
315pub struct CM {
316 pub id: i64,
317 pub contract_id: String,
318 pub pos_num: i64,
319 pub name: String,
320 pub pic: String,
321 pub litpic: String,
322 pub url: String,
323 pub style: i64,
324 pub agency: String,
325 pub label: String,
326 pub intro: String,
327 pub creative_type: i64,
328 pub request_id: String,
329 pub src_id: i64,
330 pub area: i64,
331 pub is_ad_loc: bool,
332 pub ad_cb: String,
333 pub title: String,
334 pub server_type: i64,
335 pub cm_mark: i64,
336 pub stime: i64,
337 pub mid: String,
338 pub activity_type: i64,
339 pub epid: i64,
340 pub sub_title: String,
341 pub ad_desc: String,
342 pub adver_name: String,
343 pub null_frame: bool,
344 pub pic_main_color: String,
345}