worktree_repository.rs

 1use crate::db::ProjectId;
 2use sea_orm::entity::prelude::*;
 3
 4#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel)]
 5#[sea_orm(table_name = "worktree_repositories")]
 6pub struct Model {
 7    #[sea_orm(primary_key)]
 8    pub project_id: ProjectId,
 9    #[sea_orm(primary_key)]
10    pub worktree_id: i64,
11    #[sea_orm(primary_key)]
12    pub work_directory_id: i64,
13    pub scan_id: i64,
14    pub branch: Option<String>,
15    pub is_deleted: bool,
16}
17
18#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
19pub enum Relation {}
20
21impl ActiveModelBehavior for ActiveModel {}