use crate::client::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct UserBadgeProgress {
#[serde(rename = "_id")]
pub _id: String,
#[serde(rename = "tenantId")]
pub tenant_id: String,
#[serde(rename = "userId")]
pub user_id: String,
#[serde(rename = "firstCommentId")]
pub first_comment_id: String,
#[serde(rename = "firstCommentDate")]
pub first_comment_date: chrono::DateTime<chrono::FixedOffset>,
#[serde(rename = "autoTrustFactor", skip_serializing_if = "Option::is_none")]
pub auto_trust_factor: Option<f64>,
#[serde(rename = "manualTrustFactor", skip_serializing_if = "Option::is_none")]
pub manual_trust_factor: Option<f64>,
#[serde(rename = "progress")]
pub progress: std::collections::HashMap<String, f64>,
#[serde(rename = "tosAcceptedAt", skip_serializing_if = "Option::is_none")]
pub tos_accepted_at: Option<chrono::DateTime<chrono::FixedOffset>>,
}
impl UserBadgeProgress {
pub fn new(_id: String, tenant_id: String, user_id: String, first_comment_id: String, first_comment_date: chrono::DateTime<chrono::FixedOffset>, progress: std::collections::HashMap<String, f64>) -> UserBadgeProgress {
UserBadgeProgress {
_id,
tenant_id,
user_id,
first_comment_id,
first_comment_date,
auto_trust_factor: None,
manual_trust_factor: None,
progress,
tos_accepted_at: None,
}
}
}