Finish porting remaining db methods to sea-orm

This commit is contained in:
Antonio Scandurra
2022-12-02 13:58:23 +01:00
parent 585ac3e1be
commit dec5f37e4e
10 changed files with 399 additions and 418 deletions
+13 -11
View File
@@ -1,23 +1,25 @@
use super::{ProjectId, WorktreeEntryId, WorktreeId};
use super::ProjectId;
use sea_orm::entity::prelude::*;
#[derive(Clone, Debug, PartialEq, Eq, DeriveEntityModel)]
#[sea_orm(table_name = "worktree_entries")]
pub struct Model {
#[sea_orm(primary_key)]
project_id: ProjectId,
pub project_id: ProjectId,
#[sea_orm(primary_key)]
worktree_id: WorktreeId,
pub worktree_id: i64,
#[sea_orm(primary_key)]
id: WorktreeEntryId,
is_dir: bool,
path: String,
inode: u64,
mtime_seconds: u64,
mtime_nanos: u32,
is_symlink: bool,
is_ignored: bool,
pub id: i64,
pub is_dir: bool,
pub path: String,
pub inode: i64,
pub mtime_seconds: i64,
pub mtime_nanos: u32,
pub is_symlink: bool,
pub is_ignored: bool,
}
#[derive(Copy, Clone, Debug, EnumIter, DeriveRelation)]
pub enum Relation {}
impl ActiveModelBehavior for ActiveModel {}