-- CreateTable
CREATE TABLE "dept_document" (
    "id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
    "deptId" INTEGER NOT NULL,
    "parsedFileName" TEXT NOT NULL,
    "parsedFilePath" TEXT NOT NULL,
    "realFileName" TEXT NOT NULL,
    "realFileAlias" TEXT NOT NULL,
    "realFilePath" TEXT NOT NULL,
    "isPublic" INTEGER,
    "tags" TEXT,
    "delTag" BOOLEAN NOT NULL DEFAULT false,
    "createdAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
    "lastUpdatedAt" DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
    CONSTRAINT "dept_document_deptId_fkey" FOREIGN KEY ("deptId") REFERENCES "dept" ("deptId") ON DELETE CASCADE ON UPDATE CASCADE
);
