init
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
// L'application peut avoir plusieurs sous servers
|
||||
|
||||
use std::hash::{Hash, Hasher};
|
||||
use chrono::{DateTime, Utc};
|
||||
use serde::{Deserialize, Serialize};
|
||||
use uuid::Uuid;
|
||||
use crate::store::models::Channel;
|
||||
|
||||
#[derive(Debug, Clone, sqlx::FromRow, Serialize, Deserialize)]
|
||||
pub struct SubServer {
|
||||
@@ -21,4 +23,18 @@ impl SubServer {
|
||||
created_at: Utc::now(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl PartialEq for SubServer {
|
||||
fn eq(&self, other: &Self) -> bool {
|
||||
self.id == other.id
|
||||
}
|
||||
}
|
||||
|
||||
impl Eq for SubServer {}
|
||||
|
||||
impl Hash for SubServer {
|
||||
fn hash<H: Hasher>(&self, state: &mut H) {
|
||||
self.id.hash(state);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user