feat(drive): start implementation of drive

- add storage.drives
    - prepare migration phase
    - add created_by and updated_by on storage.folders
This commit is contained in:
Edouard Vanbelle
2026-06-18 13:29:41 +02:00
parent 77545aee05
commit eab7a609b9
43 changed files with 2434 additions and 154 deletions
+11 -3
View File
@@ -98,9 +98,17 @@ pub trait FolderRepository: Send + Sync + 'static {
/// Permanently deletes a folder (used by the trash)
async fn delete_folder_permanently(&self, folder_id: &str) -> Result<(), DomainError>;
/// Creates a root-level home folder for a user.
/// This is used during user registration to create the user's personal folder.
async fn create_home_folder(&self, user_id: Uuid, name: String) -> Result<Folder, DomainError>;
/// Creates a root-level home folder for a user inside their personal drive.
/// Called during user registration / first login to maintain the wrapper-
/// folder convention through the D0 dual-write window (the wrapper itself
/// retires in a follow-up migration; for now it stays as a real folder
/// row stamped with `drive_id`).
async fn create_home_folder(
&self,
user_id: Uuid,
drive_id: Uuid,
name: String,
) -> Result<Folder, DomainError>;
/// Lists every folder in a subtree rooted at `folder_id` (inclusive).
///