WIP: Add repository entries to collab and synchronize when rejoining the room

co-authored-by: Max <max@zed.dev>
This commit is contained in:
Mikayla Maki 2023-05-04 16:26:37 -07:00
parent 2fe5bf419b
commit 8301ee43d6
No known key found for this signature in database
8 changed files with 267 additions and 70 deletions

View file

@ -0,0 +1,22 @@
use super::ProjectId;
use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel)]
#[sea_orm(table_name = "worktree_repositories")]
pub struct Model {
#[sea_orm(primary_key)]
pub project_id: ProjectId,
#[sea_orm(primary_key)]
pub worktree_id: i64,
#[sea_orm(primary_key)]
pub dot_git_entry_id: i64,
pub scan_id: i64,
pub branch: Option<String>,
pub work_directory_path: String,
pub is_deleted: bool,
}
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation {}
impl ActiveModelBehavior for ActiveModel {}