use crate::models;
use serde::{Deserialize, Serialize};
/// ReportReason : A reason used for reporting users
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ReportReason {
#[serde(rename = "policy", skip_serializing_if = "Option::is_none")]
pub policy: Option<Vec<String>>,
/// The label or name of the report reason
#[serde(rename = "text")]
pub text: String,
/// A brief explanation of what this reason entails
#[serde(rename = "tooltip")]
pub tooltip: String,
}
impl ReportReason {
/// A reason used for reporting users
pub fn new(text: String, tooltip: String) -> ReportReason {
ReportReason {
policy: None,
text,
tooltip,
}
}
}