mangadex_api_schema_rust/v5/
legacy_id_mapping.rs

1use mangadex_api_types::{LegacyMappingType, RelationshipType};
2use serde::Deserialize;
3use uuid::Uuid;
4
5use crate::TypedAttributes;
6
7#[derive(Debug, Deserialize, Default)]
8#[serde(rename_all = "camelCase")]
9#[cfg_attr(feature = "serialize", derive(serde::Serialize))]
10#[cfg_attr(feature = "specta", derive(specta::Type))]
11#[non_exhaustive]
12pub struct LegacyMappingIdAttributes {
13    #[serde(rename = "type")]
14    pub type_: Option<LegacyMappingType>,
15    pub legacy_id: u32,
16    pub new_id: Uuid,
17}
18
19impl TypedAttributes for LegacyMappingIdAttributes {
20    const TYPE_: mangadex_api_types::RelationshipType = RelationshipType::MappingId;
21}