use chrono::{DateTime, Utc};
use lunar_lib::id::Id;
use serde::{Deserialize, Serialize};
use crate::{
accounts::account::Account,
library::{collectable::Collectable, image_art::ImageArt},
};
pub mod database_impls;
#[derive(Debug, thiserror::Error)]
pub enum CollectionCreationError {
#[error("Collection names must be between 3 to 32 characters: Length: {0}")]
InvalidNameLength(u32),
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Collection {
pub name: String,
pub owner: Id<Account>,
pub cover_art: Option<Id<ImageArt>>,
pub items: Vec<Collectable>,
pub created: DateTime<Utc>,
pub modified: DateTime<Utc>,
pub public: bool,
}