use serde::{Serialize, Deserialize};
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct SummaryModel {
pub id: String,
pub project_id: String,
pub consignor: String,
pub consignor_info: String,
pub manufacturer: String,
pub manufacturer_info: String,
pub test_lab: String,
pub test_lab_info: String,
pub cn_name: String,
pub en_name: String,
pub classification: String,
#[serde(rename = "type")]
pub model: String,
pub trademark: String,
pub voltage: String,
pub capacity: String,
pub watt: String,
pub color: String,
pub shape: String,
pub mass: String,
#[serde(rename = "licontent")]
pub li_content: String,
pub test_report_no: String,
pub test_date: String,
pub test_manual: String,
pub test1: String,
pub test2: String,
pub test3: String,
pub test4: String,
pub test5: String,
pub test6: String,
pub test7: String,
pub test8: String,
#[serde(rename = "un38f")]
pub un38_f: String,
#[serde(rename = "un38g")]
pub un38_g: String,
pub note: String,
}
impl SummaryModel {
pub fn default() -> Self {
Self {
id: "".to_string(),
project_id: "".to_string(),
consignor: "".to_string(),
consignor_info: "".to_string(),
manufacturer: "".to_string(),
manufacturer_info: "".to_string(),
test_lab: "".to_string(),
test_lab_info: "".to_string(),
cn_name: "".to_string(),
en_name: "".to_string(),
classification: "".to_string(),
model: "".to_string(),
trademark: "".to_string(),
voltage: "".to_string(),
capacity: "".to_string(),
watt: "".to_string(),
color: "".to_string(),
shape: "".to_string(),
mass: "".to_string(),
li_content: "".to_string(),
test_report_no: "".to_string(),
test_date: "".to_string(),
test_manual: "".to_string(),
test1: "".to_string(),
test2: "".to_string(),
test3: "".to_string(),
test4: "".to_string(),
test5: "".to_string(),
test6: "".to_string(),
test7: "".to_string(),
test8: "".to_string(),
un38_f: "".to_string(),
un38_g: "".to_string(),
note: "".to_string(),
}
}
}
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct SummaryModelDocx {
#[serde(flatten)]
pub base: SummaryModel,
pub title: String,
pub project_no: String,
pub issue_date: String,
}
impl SummaryModelDocx {
pub fn default() -> Self {
Self {
base: SummaryModel::default(),
title: "".to_string(),
project_no: "".to_string(),
issue_date: "".to_string(),
}
}
}