use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct Print {
#[serde(rename = "authorId")]
pub author_id: String,
#[serde(rename = "authorName")]
pub author_name: String,
#[serde(rename = "createdAt")]
pub created_at: String,
#[serde(rename = "files")]
pub files: models::PrintFiles,
#[serde(rename = "id")]
pub id: String,
#[serde(rename = "note")]
pub note: String,
#[serde(rename = "ownerId", skip_serializing_if = "Option::is_none")]
pub owner_id: Option<String>,
#[serde(rename = "timestamp")]
pub timestamp: String,
#[serde(rename = "worldId")]
pub world_id: String,
#[serde(rename = "worldName")]
pub world_name: String,
}
impl Print {
pub fn new(
author_id: String,
author_name: String,
created_at: String,
files: models::PrintFiles,
id: String,
note: String,
timestamp: String,
world_id: String,
world_name: String,
) -> Print {
Print {
author_id,
author_name,
created_at,
files,
id,
note,
owner_id: None,
timestamp,
world_id,
world_name,
}
}
}