28 lines
758 B
Rust
28 lines
758 B
Rust
|
|
use crate::db::models::Project;
|
||
|
|
|
||
|
|
#[tauri::command]
|
||
|
|
pub fn create_project(name: String) -> Result<Project, String> {
|
||
|
|
// TODO: Use actual database connection from app state
|
||
|
|
Ok(Project {
|
||
|
|
id: uuid::Uuid::new_v4().to_string(),
|
||
|
|
name,
|
||
|
|
created_at: chrono::Utc::now().to_rfc3339(),
|
||
|
|
updated_at: chrono::Utc::now().to_rfc3339(),
|
||
|
|
settings: None,
|
||
|
|
status: "active".to_string(),
|
||
|
|
})
|
||
|
|
}
|
||
|
|
|
||
|
|
#[tauri::command]
|
||
|
|
pub fn get_project(id: String) -> Result<Option<Project>, String> {
|
||
|
|
// TODO: Use actual database connection from app state
|
||
|
|
let _ = id;
|
||
|
|
Ok(None)
|
||
|
|
}
|
||
|
|
|
||
|
|
#[tauri::command]
|
||
|
|
pub fn list_projects() -> Result<Vec<Project>, String> {
|
||
|
|
// TODO: Use actual database connection from app state
|
||
|
|
Ok(vec![])
|
||
|
|
}
|