use chrono::{DateTime, Utc}; use serde::{Deserialize, Serialize}; use uuid::Uuid; #[derive(Debug, Clone, Serialize, Deserialize, sqlx::FromRow)] pub struct Club { pub id: String, pub profile_id: String, pub name: String, pub coins: i64, pub level: i64, pub created_at: DateTime, pub updated_at: DateTime, pub manager_name: Option, } impl Club { pub fn new(profile_id: impl Into, name: impl Into, coins: i64) -> Self { let now = Utc::now(); Self { id: Uuid::new_v4().to_string(), profile_id: profile_id.into(), name: name.into(), coins, level: 1, created_at: now, updated_at: now, manager_name: Some("Player Manager".to_string()), } } }