1use crate::models::{Pendant, VipLabel};
2use serde::{Deserialize, Serialize};
3
4#[derive(Default, Debug, Clone, Serialize, Deserialize)]
6pub struct ModuleAuthor {
7 pub avatar: Option<serde_json::Value>,
9 pub decorate: Option<serde_json::Value>,
11 pub face: String,
14 pub face_nft: bool,
16 pub following: Option<bool>,
18 pub jump_url: String,
20 pub label: String,
22 pub mid: i64,
24 pub name: String,
26 pub official: Option<AuthorOfficial>,
28 #[serde(rename = "official_verify")]
30 pub official_verify: Option<AuthorOfficial>,
31 pub pendant: Option<Pendant>,
33 pub pub_action: Option<String>,
35 pub pub_time: String,
37 pub pub_ts: i64,
39 pub views_text: String,
40 pub vip: Option<AuthorVip>,
42 #[serde(rename = "type")]
44 pub type_field: Option<String>,
45}
46
47#[derive(Default, Debug, Clone, Serialize, Deserialize)]
48pub struct AuthorOfficial {
49 pub desc: String,
51 pub role: i64,
52 pub title: String,
53 #[serde(rename = "type")]
55 pub type_field: i64,
56}
57
58#[derive(Default, Debug, Clone, Serialize, Deserialize)]
59pub struct AuthorVip {
60 pub due_date: i64,
62 pub label: VipLabel,
64 pub nickname_color: String,
66 pub status: i64,
68 pub r#type: i64,
70
71 pub role: Option<i64>,
73 pub theme_type: Option<i64>,
75 pub tv_due_date: Option<i64>,
77 pub tv_vip_pay_type: Option<i64>,
79 pub tv_vip_status: Option<i64>,
81 pub vip_pay_type: Option<i64>,
83}
84
85#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
87pub struct ModuleMore {
88 #[serde(rename = "three_point_items")]
90 pub three_point_items: Vec<ThreePointItem>,
91}
92
93#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
94pub struct ThreePointItem {
95 pub label: String,
97 pub modal: Option<Modal>,
99 pub params: Option<Params>,
101 #[serde(rename = "type")]
103 pub type_field: String,
104}
105
106#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
107pub struct Modal {
108 pub cancel: String,
110 pub confirm: String,
112 pub content: String,
114 pub title: String,
116}
117
118#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
119pub struct Params {
120 #[serde(rename = "dyn_id_str")]
122 pub dyn_id_str: String,
123 #[serde(rename = "dyn_type")]
125 pub dyn_type: i64,
126 #[serde(rename = "rid_str")]
128 pub rid_str: String,
129}
130
131#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
133pub struct ModuleStat {
134 pub coin: Option<StatData>,
136 pub comment: StatData,
138 pub favorite: Option<StatData>,
140 pub forward: StatData,
142 pub like: StatData,
144}
145
146#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
147pub struct StatData {
148 pub count: i64,
150 pub forbidden: bool,
152 pub hidden: Option<bool>,
154 pub status: Option<bool>,
156}
157
158#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
160pub struct ModuleContent {
161 pub paragraphs: Vec<Paragraph>,
163}
164
165#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
166pub struct Paragraph {
167 pub align: i64,
169 #[serde(rename = "para_type")]
171 pub para_type: i64,
172 pub text: Option<Text>,
174 pub pics: Option<ParagraphPics>,
176 pub line: Option<ParagraphLine>,
178 pub list: Option<ParagraphList>,
180 #[serde(rename = "link_card")]
182 pub link_card: Option<LinkCard>,
183 pub code: Option<ParagraphCode>,
185}
186
187#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
188pub struct Text {
189 pub nodes: Vec<TextNode>,
191}
192
193#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
194pub struct TextNode {
195 #[serde(rename = "type")]
197 pub type_field: String,
198 pub word: Option<TextNodeWord>,
200 pub rich: Option<serde_json::Value>, pub formula: Option<TextNodeFormula>,
204}
205
206#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
207pub struct TextNodeWord {
208 #[serde(rename = "font_size")]
210 pub font_size: i64,
211 pub style: serde_json::Value,
213 pub words: String,
215}
216
217#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
218pub struct TextNodeFormula {
219 #[serde(rename = "latex_content")]
221 pub latex_content: String,
222}
223
224#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
225pub struct ParagraphLine {
226 pub pic: LinePic,
228}
229
230#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
231pub struct LinePic {
232 pub height: i64,
234 pub url: String,
236}
237
238#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
239pub struct ParagraphList {
240 pub style: i64,
242 pub items: Vec<ListItem>,
244}
245
246#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
247pub struct ListItem {
248 pub level: i64,
250 pub nodes: Vec<TextNode>,
252 pub order: i64,
254}
255
256#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
257pub struct ParagraphPics {
258 pub pics: Vec<PicItem>,
260 pub style: i64,
262}
263
264#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
265pub struct PicItem {
266 pub height: i64,
268 #[serde(rename = "live_url")]
270 pub live_url: serde_json::Value,
271 pub size: Option<i64>,
273 pub url: String,
275 pub width: i64,
277}
278
279#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
280pub struct LinkCard {
281 pub card: Card,
283}
284
285#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
286pub struct Card {
287 pub oid: String,
289 #[serde(rename = "type")]
291 pub type_field: String,
292 pub common: Option<serde_json::Value>,
295 pub goods: Option<serde_json::Value>,
297 #[serde(rename = "match")]
299 pub match_field: Option<MatchCard>,
300 pub vote: Option<serde_json::Value>,
302 pub ugc: Option<serde_json::Value>,
304 pub reserve: Option<serde_json::Value>,
306 #[serde(rename = "upower_lottery")]
308 pub upower_lottery: Option<UpowerLottery>,
309 pub opus: Option<OpusCard>,
311 pub music: Option<serde_json::Value>,
313 pub live: Option<serde_json::Value>,
315 #[serde(rename = "item_null")]
317 pub item_null: Option<ItemNullCard>,
318}
319
320#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
321pub struct MatchCard {
322 #[serde(rename = "id_str")]
324 pub id_str: String,
325 #[serde(rename = "jump_url")]
327 pub jump_url: String,
328 #[serde(rename = "match_info")]
330 pub match_info: MatchInfo,
331}
332
333#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
334pub struct MatchInfo {
335 #[serde(rename = "center_bottom")]
337 pub center_bottom: String,
338 #[serde(rename = "center_top")]
340 pub center_top: Vec<String>,
341 #[serde(rename = "left_team")]
343 pub left_team: TeamInfo,
344 #[serde(rename = "right_team")]
346 pub right_team: TeamInfo,
347 pub status: i64,
349 #[serde(rename = "sub_title")]
351 pub sub_title: String,
352 pub title: String,
354}
355
356#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
357pub struct TeamInfo {
358 pub name: String,
360 pub pic: String,
362}
363
364#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
365pub struct UpowerLottery {
366 pub button: UpowerLotteryButton,
368 pub desc: UpowerLotteryDesc,
370 pub hint: UpowerLotteryHint,
372 #[serde(rename = "jump_url")]
374 pub jump_url: String,
375 pub rid: i64,
377 pub state: i64,
379 pub title: String,
381 #[serde(rename = "up_mid")]
383 pub up_mid: i64,
384 #[serde(rename = "upower_action_state")]
386 pub upower_action_state: i64,
387 #[serde(rename = "upower_level")]
389 pub upower_level: i64,
390}
391
392#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
393pub struct UpowerLotteryButton {
394 pub check: UpowerLotteryButtonCheck,
396 pub status: i64,
398 #[serde(rename = "type")]
400 pub type_field: i64,
401}
402
403#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
404pub struct UpowerLotteryButtonCheck {
405 pub disable: i64,
407 #[serde(rename = "icon_url")]
409 pub icon_url: String,
410 pub text: String,
412 pub toast: String,
414}
415
416#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
417pub struct UpowerLotteryDesc {
418 #[serde(rename = "jump_url")]
420 pub jump_url: String,
421 pub style: i64,
423 pub text: String,
425}
426
427#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
428pub struct UpowerLotteryHint {
429 pub style: i64,
431 pub text: String,
433}
434
435#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
436pub struct OpusCard {
437 pub author: OpusAuthor,
439 pub cover: String,
441 #[serde(rename = "jump_url")]
443 pub jump_url: String,
444 pub stat: OpusStat,
446 pub title: String,
448}
449
450#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
451pub struct OpusAuthor {
452 pub name: String,
454}
455
456#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
457pub struct OpusStat {
458 pub view: i64,
460}
461
462#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
463pub struct ItemNullCard {
464 pub text: String,
466}
467
468#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
469pub struct ParagraphCode {
470 pub content: String,
472 pub lang: String,
474}
475
476#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
478pub struct ModuleTopic {
479 pub id: i64,
481 #[serde(rename = "jump_url")]
483 pub jump_url: String,
484 pub name: String,
486}
487
488#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
490pub struct ModuleCollection {
491 pub count: String,
493 pub id: i64,
495 pub name: String,
497 pub title: String,
499}
500
501#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
503pub struct ModuleExtend {
504 pub items: Vec<ExtendItem>,
506}
507
508#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
509pub struct ExtendItem {
510 pub icon: Option<String>,
512 #[serde(rename = "icon_svg")]
514 pub icon_svg: serde_json::Value,
515 #[serde(rename = "jump_url")]
517 pub jump_url: String,
518 pub text: String,
520}
521
522#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
524pub struct ModuleBottom {
525 #[serde(rename = "share_info")]
527 pub share_info: ShareInfo,
528}
529
530#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
531pub struct ShareInfo {
532 pub pic: String,
534 pub summary: String,
536 pub title: String,
538}
539
540#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
542pub struct Root {
543 pub additional: Option<serde_json::Value>,
544 pub desc: Option<serde_json::Value>,
545 pub major: Major,
546 pub topic: Option<serde_json::Value>,
547}
548
549#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
550pub struct Major {
551 pub archive: Archive,
552 #[serde(rename = "type")]
553 pub type_field: String,
554}
555
556#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
557pub struct Archive {
558 pub aid: String,
559 pub badge: Badge,
560 pub bvid: String,
561 pub cover: String,
562 pub desc: String,
563 pub disable_preview: i64,
564 pub duration_text: String,
565 pub jump_url: String,
566 pub stat: Stat,
567 pub title: String,
568 #[serde(rename = "type")]
569 pub type_field: i64,
570}
571
572#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
573pub struct Badge {
574 pub bg_color: String,
575 pub color: String,
576 pub icon_url: serde_json::Value,
577 pub text: String,
578}
579
580#[derive(Default, Debug, Clone, PartialEq, Serialize, Deserialize)]
581pub struct Stat {
582 pub danmaku: String,
583 pub play: String,
584}