1use serde::{Serialize, Deserialize};
2
3
4#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
5#[serde(rename_all = "camelCase")]
6pub struct SummaryModel {
7 pub id: String,
9 pub project_id: String,
11
12 pub consignor: String,
14 pub consignor_info: String,
16
17 pub manufacturer: String,
19 pub manufacturer_info: String,
21
22 pub test_lab: String,
24 pub test_lab_info: String,
26
27 pub cn_name: String,
29 pub en_name: String,
31 pub classification: String,
33
34 #[serde(rename = "type")]
36 pub model: String,
37 pub trademark: String,
39
40 pub voltage: String,
42 pub capacity: String,
44
45 pub watt: String,
47 pub color: String,
49 pub shape: String,
51
52 pub mass: String,
54 #[serde(rename = "licontent")]
56 pub li_content: String,
57
58 pub test_report_no: String,
60 pub test_date: String,
62
63
64 pub test_manual: String,
66
67 pub test1: String,
69 pub test2: String,
70 pub test3: String,
71
72 pub test4: String,
73 pub test5: String,
74 pub test6: String,
75
76 pub test7: String,
77 pub test8: String,
78
79 #[serde(rename = "un38f")]
80 pub un38_f: String,
81 #[serde(rename = "un38g")]
82 pub un38_g: String,
83
84 pub note: String,
86}
87
88impl SummaryModel {
89 pub fn default() -> Self {
90 Self {
91 id: "".to_string(),
92 project_id: "".to_string(),
93 consignor: "".to_string(),
94 consignor_info: "".to_string(),
95 manufacturer: "".to_string(),
96 manufacturer_info: "".to_string(),
97 test_lab: "".to_string(),
98 test_lab_info: "".to_string(),
99 cn_name: "".to_string(),
100 en_name: "".to_string(),
101 classification: "".to_string(),
102 model: "".to_string(),
103 trademark: "".to_string(),
104 voltage: "".to_string(),
105 capacity: "".to_string(),
106 watt: "".to_string(),
107 color: "".to_string(),
108 shape: "".to_string(),
109 mass: "".to_string(),
110 li_content: "".to_string(),
111 test_report_no: "".to_string(),
112 test_date: "".to_string(),
113 test_manual: "".to_string(),
114 test1: "".to_string(),
115 test2: "".to_string(),
116 test3: "".to_string(),
117 test4: "".to_string(),
118 test5: "".to_string(),
119 test6: "".to_string(),
120 test7: "".to_string(),
121 test8: "".to_string(),
122 un38_f: "".to_string(),
123 un38_g: "".to_string(),
124 note: "".to_string(),
125 }
126 }
127}
128
129#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
130#[serde(rename_all = "camelCase")]
131pub struct SummaryModelDocx {
132 #[serde(flatten)]
133 pub base: SummaryModel,
134 pub title: String,
136 pub project_no: String,
138 pub issue_date: String,
140}
141
142
143impl SummaryModelDocx {
144 pub fn default() -> Self {
145 Self {
146 base: SummaryModel::default(),
147 title: "".to_string(),
148 project_no: "".to_string(),
149 issue_date: "".to_string(),
150 }
151 }
152}