pub mod media;
use derive_getters::Getters;
use media::Media;
use serde::{Deserialize, Serialize};
use std::collections::HashMap;
use std::string::String;
use uuid;

#[derive(Getters, Deserialize, Serialize, Debug, Clone, Eq, PartialEq)]
pub struct User {
    pub name: String,
    pub medias: HashMap<String, Media>,
    uid: uuid::Uuid,
}

impl User {
    pub fn new(name: String, medias: HashMap<String, Media>) -> Self {
        Self {
            name: name,
            medias: medias,
            uid: uuid::Uuid::new_v4(),
        }
    }
}
