This commit is contained in:
2025-08-11 16:59:31 +02:00
parent d691c1d944
commit 39d1d9a2b7
14 changed files with 535 additions and 13 deletions

View File

@@ -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);
}
}