extern crate alloc;
#[cfg(not(feature = "std"))]
use alloc::{format, string::{String, ToString}, vec::Vec};
#[cfg(feature = "std")]
use alloc::{format, string::String, vec::Vec};
use midds_types_codegen::{midds_collection, midds_string};
#[cfg(feature = "js")]
use serde::{Deserialize, Serialize};
#[cfg(feature = "js")]
use wasm_bindgen::prelude::*;
use frame_support::sp_runtime::RuntimeDebug;
use parity_scale_codec::{Decode, DecodeWithMemTracking, Encode, MaxEncodedLen};
use scale_info::TypeInfo;
#[midds_string(256)]
pub struct ArtistFullName;
#[midds_string(128)]
pub struct ArtistAlias;
#[midds_string(128)]
pub struct EntityName;
#[midds_collection(ArtistAlias, 12)]
pub struct ArtistAliases;
#[midds_string(16, regex = r"^\d{15}[\dX]$")]
pub struct Isni;
pub type Ipi = u64;
#[derive(
Clone,
Copy,
PartialEq,
Eq,
Encode,
Decode,
DecodeWithMemTracking,
MaxEncodedLen,
RuntimeDebug,
TypeInfo,
)]
#[cfg_attr(feature = "js", wasm_bindgen)]
#[cfg_attr(feature = "js", derive(Deserialize, Serialize))]
pub enum ArtistType {
Person,
Group,
Orchestra,
Choir,
Other,
}
#[derive(
Clone,
Copy,
PartialEq,
Eq,
Encode,
Decode,
DecodeWithMemTracking,
MaxEncodedLen,
RuntimeDebug,
TypeInfo,
)]
#[cfg_attr(feature = "js", wasm_bindgen)]
#[cfg_attr(feature = "js", derive(Deserialize, Serialize))]
pub enum EntityType {
Publisher,
Producer,
}
#[derive(
Clone,
Copy,
PartialEq,
Eq,
Encode,
Decode,
DecodeWithMemTracking,
TypeInfo,
MaxEncodedLen,
RuntimeDebug,
)]
#[cfg_attr(feature = "js", wasm_bindgen)]
#[cfg_attr(feature = "js", derive(Deserialize, Serialize))]
pub enum ArtistGender {
Male,
Female,
Neither,
}