mangadex_api_schema_rust/v5/
user_report.rs

1use mangadex_api_types::{MangaDexDateTime, RelationshipType, ReportStatus};
2use serde::Deserialize;
3
4use crate::TypedAttributes;
5
6/// User submitted report information.
7#[derive(Clone, Debug, Deserialize, Default)]
8#[cfg_attr(feature = "serialize", derive(serde::Serialize))]
9#[serde(rename_all = "camelCase")]
10#[non_exhaustive]
11#[cfg_attr(feature = "specta", derive(specta::Type))]
12pub struct UserReportAttributes {
13    pub details: String,
14    pub object_id: String,
15    pub status: ReportStatus,
16    /// Datetime in `YYYY-MM-DDTHH:MM:SS+HH:MM` format.
17    #[cfg_attr(feature = "specta", specta(type = String))]
18    #[cfg_attr(
19        feature = "serialize",
20        serde(serialize_with = "crate::v5::mangadex_datetime_serialize")
21    )]
22    pub created_at: MangaDexDateTime,
23}
24
25impl TypedAttributes for UserReportAttributes {
26    const TYPE_: mangadex_api_types::RelationshipType = RelationshipType::Report;
27}