🍄 Separate trash for the personal and shared drive (#189)

This commit is contained in:
Montassar Ghanmy
2023-10-06 17:05:07 +01:00
committed by GitHub
parent f0dcf34bbe
commit edfd765d57
34 changed files with 440 additions and 185 deletions
@@ -5,9 +5,13 @@ import { FileVersion } from "./file-version";
import search from "./drive-file.search";
export const TYPE = "drive_files";
export type DriveScope = "personal" | "shared";
@Entity(TYPE, {
globalIndexes: [["company_id", "parent_id"]],
globalIndexes: [
["company_id", "parent_id"],
["company_id", "is_in_trash"],
],
primaryKey: [["company_id"], "id"],
type: TYPE,
search,
@@ -73,6 +77,10 @@ export class DriveFile {
@Column("last_version_cache", "encoded_json")
last_version_cache: Partial<FileVersion>;
@Type(() => String)
@Column("scope", "string")
scope: DriveScope;
}
export type AccessInformation = {