use serde::{Deserialize, Serialize};

#[derive(Debug, Serialize, Deserialize, PartialEq, Eq, PartialOrd, Ord)]
pub struct DataBaseConfig<'a> {
    pub user: &'a str,
    pub password: &'a str,
    pub url: &'a str,
    pub port: u16,
    pub schema: &'a str,
}

impl<'a> DataBaseConfig<'a> {
    pub fn new(user: &'a str, password: &'a str, url: &'a str, port: u16, schema: &'a str) -> Self {
        Self {
            user,
            password,
            url,
            port,
            schema,
        }
    }
}
