use pyo3::prelude::*; use serde::{Serialize, Deserialize}; #[pyclass] #[derive(Serialize, Deserialize, Debug)] pub struct Event { #[pyo3(get, set)] pub id: i32, #[pyo3(get, set)] pub title: String, #[pyo3(get, set)] pub description: Option<String>, #[pyo3(get, set)] pub location: String, #[pyo3(get, set)] pub date: String, // or NaiveDate #[pyo3(get, set)] pub time: String, // or NaiveTime #[pyo3(get, set)] pub created_by: i32, #[pyo3(get, set)] pub group_id: Option<i32>, #[pyo3(get, set)] pub created_at: String, }