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
use serde::Deserialize;
use uuid::Uuid;
use crate::v5::{chapter_aggregate_array_or_map, volume_aggregate_array_or_map};
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[non_exhaustive]
pub struct MangaAggregate {
#[serde(with = "volume_aggregate_array_or_map")]
pub volumes: Vec<VolumeAggregate>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[non_exhaustive]
pub struct VolumeAggregate {
pub volume: String,
pub count: u32,
#[serde(with = "chapter_aggregate_array_or_map")]
pub chapters: Vec<ChapterAggregate>,
}
#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
#[non_exhaustive]
pub struct ChapterAggregate {
pub chapter: String,
pub id: Uuid,
pub others: Vec<Uuid>,
pub count: u32,
}