scryer-db 0.2.0

Database models and Turso/SQLite storage layer for Scryer code intelligence
use super::{ArchitecturalDecision, ProjectDependency, SourceFile};
use toasty::Model;

#[derive(Debug, Clone, Model)]
#[table = "project"]
pub struct Project {
    #[key]
    #[auto]
    pub id: u64,
    #[unique]
    pub slug: String,
    #[unique]
    pub root_path: String,
    pub git_remote: Option<String>,
    pub default_branch: String,
    pub is_active: bool,
    pub created_at: String,
    pub updated_at: String,
    #[has_many]
    pub files: toasty::Deferred<Vec<SourceFile>>,
    #[has_many]
    pub adrs: toasty::Deferred<Vec<ArchitecturalDecision>>,
    #[has_many]
    pub project_dependencies: toasty::Deferred<Vec<ProjectDependency>>,
}