feat: automatic file organization based on rules, close #28

This commit is contained in:
krau
2025-04-12 14:27:13 +08:00
parent 3bdef20e85
commit 166c27c70f
9 changed files with 345 additions and 43 deletions

View File

@@ -41,3 +41,7 @@ func GetDirsByUserIDAndStorageName(userID uint, storageName string) ([]Dir, erro
func DeleteDirForUser(userID uint, storageName, path string) error {
return db.Unscoped().Where("user_id = ? AND storage_name = ? AND path = ?", userID, storageName, path).Delete(&Dir{}).Error
}
func DeleteDirByID(id uint) error {
return db.Unscoped().Delete(&Dir{}, id).Error
}