This commit is contained in:
2025-07-29 20:20:02 +02:00
parent 9b8461314f
commit 62dc6deb79
36 changed files with 2837 additions and 37 deletions

View File

@@ -0,0 +1,24 @@
// L'application peut avoir plusieurs sous servers
use chrono::{DateTime, Utc};
use serde::{Deserialize, Serialize};
use uuid::Uuid;
#[derive(Debug, Clone, sqlx::FromRow, Serialize, Deserialize)]
pub struct SubServer {
pub id: Uuid,
pub name: String,
pub password: String, // voir si on le hash, mais sera certainement pas nécessaire.
pub created_at: DateTime<Utc>,
}
impl SubServer {
pub fn new(name: String, password: String) -> Self {
Self {
id: Uuid::new_v4(),
name,
password,
created_at: Utc::now(),
}
}
}