use super::{DependencyPackage, Project, Scope, Symbol};
use toasty::Model;
#[derive(Debug, Clone, Model)]
#[table = "source_file"]
pub struct SourceFile {
#[key]
#[auto]
pub id: u64,
#[index]
pub project_id: u64,
#[belongs_to]
pub project: toasty::Deferred<Project>,
#[index]
pub dependency_package_id: Option<u64>,
#[belongs_to(key = dependency_package_id)]
pub dependency_package: toasty::Deferred<Option<DependencyPackage>>,
pub path: String,
pub content_hash: String,
pub language: String,
pub line_count: u32,
pub byte_size: usize,
#[has_many]
pub symbols: toasty::Deferred<Vec<Symbol>>,
#[has_many]
pub scopes: toasty::Deferred<Vec<Scope>>,
}