跳轉到主要內容
dropboxProjects 將一個專案對應到某位使用者 Dropbox 中的資料夾。與多位 Dropbox 使用者共用的專案,每位使用者各有一份文件。此集合屬於 Dropbox 同步:third-party-datastore(services/third-party-datastore/app/js/StateManager.mjs)寫入它,dropbox web 模組(services/web/modules/dropbox/app/src/DropboxHandler.mjs)讀取並清除它。沒有 Mongoose schema。

欄位

誰寫入

誰讀取

索引

CE 在這裡沒有其他索引。唯一索引 projectId_userId_1 與 userId_dropboxId_1 來自 tools/migrations/20220815105500_create_dropboxProjects_index.mjs 與 20220817120900_create_dropboxProjects_index.mjs,它們只帶有 saas 標籤,因此 CE 從不執行它們。

說明

  • 唯一性僅來自 setProjectFolder 中每次插入前的刪除(StateManager.mjs:140-149)。StateManager.mjs:3-11 的註解提到唯一索引;CE 沒有這些索引。
  • 專案的對應被移除後,其資料夾仍留在 Dropbox 中。在那裡的編輯會被當作新專案讀取,與在 Dropbox 中建立的資料夾相同(DropboxHandler.mjs:148-149)。
  • 已刪除的專案在到期前保留其對應,因為它仍可被還原(index.mjs:52-53)。
  • 使用者的 Dropbox list_folder 游標不在這裡,而在 users.dropbox.cursor 中(StateManager.mjs:177-184)。
最後修改於 2026年11月20日