chore: initial project setup
- Cargo init with dependencies (ratatui, crossterm, tokio, reqwest, rusqlite, serde, chrono, dirs) - Module structure: domain/, ui/, infrastructure/ - Domain models (TaskList, Task, TaskStatus, SyncAction, SyncQueueItem) - .gitignore for target/ and *.db - Rustls-based TLS (no OpenSSL dependency)
This commit is contained in:
@@ -0,0 +1 @@
|
||||
pub mod models;
|
||||
@@ -0,0 +1,43 @@
|
||||
use chrono::NaiveDateTime;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
|
||||
pub struct TaskList {
|
||||
pub id: String,
|
||||
pub title: String,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
|
||||
pub struct Task {
|
||||
pub id: String,
|
||||
pub list_id: String,
|
||||
pub title: String,
|
||||
pub notes: Option<String>,
|
||||
pub status: TaskStatus,
|
||||
pub due: Option<NaiveDateTime>,
|
||||
pub position: i64,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
|
||||
pub enum TaskStatus {
|
||||
NeedsAction,
|
||||
Completed,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
|
||||
pub enum SyncAction {
|
||||
Create,
|
||||
Update,
|
||||
Delete,
|
||||
Reorder,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
pub struct SyncQueueItem {
|
||||
pub id: i64,
|
||||
pub action: SyncAction,
|
||||
pub task_id: String,
|
||||
pub list_id: String,
|
||||
pub payload: String,
|
||||
pub created_at: String,
|
||||
}
|
||||
Reference in New Issue
Block a user