1#![allow(
6 missing_docs,
7 clippy::doc_lazy_continuation,
8 clippy::doc_overindented_list_items
9)]
10
11use serde::{Deserialize, Serialize};
12
13#[derive(Debug, Clone, Default, Serialize, Deserialize)]
15pub struct CategoryInterface {
16 pub title: String,
18 pub visibility: Visibility,
20 #[serde(
21 rename = "thumbnailUrl",
22 default,
23 skip_serializing_if = "Option::is_none"
24 )]
25 pub thumbnail_url: Option<String>,
26 #[serde(default, skip_serializing_if = "Vec::is_empty")]
27 pub posts: Vec<PostInterface>,
28 #[serde(
29 rename = "subCategories",
30 default,
31 skip_serializing_if = "Vec::is_empty"
32 )]
33 pub sub_categories: Vec<SubCategoryInterface>,
34}
35
36#[derive(Debug, Clone, Default, Serialize, Deserialize)]
38pub struct InstructorDetails {
39 pub name: String,
41 pub description: String,
43}
44
45#[derive(Debug, Clone, Default, Serialize, Deserialize)]
47pub struct PostInterface {
48 pub title: String,
50 pub visibility: Visibility,
52 #[serde(
53 rename = "thumbnailUrl",
54 default,
55 skip_serializing_if = "Option::is_none"
56 )]
57 pub thumbnail_url: Option<String>,
58 #[serde(rename = "contentType")]
60 pub content_type: ContentType,
61 pub description: String,
63 #[serde(
64 rename = "bucketVideoUrl",
65 default,
66 skip_serializing_if = "Option::is_none"
67 )]
68 pub bucket_video_url: Option<String>,
69 #[serde(
70 rename = "postMaterials",
71 default,
72 skip_serializing_if = "Vec::is_empty"
73 )]
74 pub post_materials: Vec<PostMaterialInterface>,
75}
76
77#[derive(Debug, Clone, Default, Serialize, Deserialize)]
79pub struct PostMaterialInterface {
80 pub title: String,
82 #[serde(rename = "type")]
84 pub type_: Type,
85 pub url: String,
87}
88
89#[derive(Debug, Clone, Default, Serialize, Deserialize)]
91pub struct ProductInterface {
92 pub title: String,
94 pub description: String,
96 #[serde(rename = "imageUrl", default, skip_serializing_if = "Option::is_none")]
97 pub image_url: Option<String>,
98 #[serde(default, skip_serializing_if = "Vec::is_empty")]
100 pub categories: Vec<CategoryInterface>,
101 #[serde(
102 rename = "instructorDetails",
103 default,
104 skip_serializing_if = "Option::is_none"
105 )]
106 pub instructor_details: Option<InstructorDetails>,
107}
108
109#[derive(Debug, Clone, Default, Serialize, Deserialize)]
111pub struct PublicExporterPayload {
112 #[serde(rename = "locationId")]
114 pub location_id: String,
115 #[serde(rename = "userId", default, skip_serializing_if = "Option::is_none")]
116 pub user_id: Option<String>,
117 #[serde(default, skip_serializing_if = "Vec::is_empty")]
119 pub products: Vec<ProductInterface>,
120}
121
122#[derive(Debug, Clone, Default, Serialize, Deserialize)]
124pub struct SubCategoryInterface {
125 pub title: String,
127 pub visibility: Visibility,
129 #[serde(
130 rename = "thumbnailUrl",
131 default,
132 skip_serializing_if = "Option::is_none"
133 )]
134 pub thumbnail_url: Option<String>,
135 #[serde(default, skip_serializing_if = "Vec::is_empty")]
136 pub posts: Vec<PostInterface>,
137}
138
139pub type ContentType = String;
142
143pub type Type = String;
150
151pub type Visibility = String;