@shumai-one/shumai-transcode 0.3.10 → 0.3.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shumai-one/shumai-transcode",
3
- "version": "0.3.10",
3
+ "version": "0.3.11",
4
4
  "description": "Media transcoding worker for the shumai media workspace",
5
5
  "type": "module",
6
6
  "bin": {
@@ -27,12 +27,12 @@
27
27
  "zod": "4.4.3"
28
28
  },
29
29
  "optionalDependencies": {
30
- "@shumai-one/shumai-transcode-darwin-arm64": "0.3.10",
31
- "@shumai-one/shumai-transcode-darwin-x64": "0.3.10",
32
- "@shumai-one/shumai-transcode-linux-arm64": "0.3.10",
33
- "@shumai-one/shumai-transcode-linux-x64": "0.3.10",
34
- "@shumai-one/shumai-transcode-win32-arm64": "0.3.10",
35
- "@shumai-one/shumai-transcode-win32-x64": "0.3.10"
30
+ "@shumai-one/shumai-transcode-darwin-arm64": "0.3.11",
31
+ "@shumai-one/shumai-transcode-darwin-x64": "0.3.11",
32
+ "@shumai-one/shumai-transcode-linux-arm64": "0.3.11",
33
+ "@shumai-one/shumai-transcode-linux-x64": "0.3.11",
34
+ "@shumai-one/shumai-transcode-win32-arm64": "0.3.11",
35
+ "@shumai-one/shumai-transcode-win32-x64": "0.3.11"
36
36
  },
37
37
  "repository": {
38
38
  "type": "git",
@@ -0,0 +1,28 @@
1
+ -- CreateTable
2
+ CREATE TABLE "recent_file_items" (
3
+ "id" TEXT NOT NULL,
4
+ "user_id" TEXT NOT NULL,
5
+ "project_id" TEXT NOT NULL,
6
+ "asset_id" TEXT NOT NULL,
7
+ "viewed_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
8
+
9
+ CONSTRAINT "recent_file_items_pkey" PRIMARY KEY ("id")
10
+ );
11
+
12
+ -- CreateIndex
13
+ CREATE INDEX "recent_file_items_user_id_project_id_viewed_at_idx" ON "recent_file_items"("user_id", "project_id", "viewed_at" DESC);
14
+
15
+ -- CreateIndex
16
+ CREATE INDEX "recent_file_items_asset_id_idx" ON "recent_file_items"("asset_id");
17
+
18
+ -- CreateIndex
19
+ CREATE UNIQUE INDEX "recent_file_items_user_id_project_id_asset_id_key" ON "recent_file_items"("user_id", "project_id", "asset_id");
20
+
21
+ -- AddForeignKey
22
+ ALTER TABLE "recent_file_items" ADD CONSTRAINT "recent_file_items_user_id_fkey" FOREIGN KEY ("user_id") REFERENCES "users"("id") ON DELETE CASCADE ON UPDATE CASCADE;
23
+
24
+ -- AddForeignKey
25
+ ALTER TABLE "recent_file_items" ADD CONSTRAINT "recent_file_items_project_id_fkey" FOREIGN KEY ("project_id") REFERENCES "projects"("id") ON DELETE CASCADE ON UPDATE CASCADE;
26
+
27
+ -- AddForeignKey
28
+ ALTER TABLE "recent_file_items" ADD CONSTRAINT "recent_file_items_asset_id_fkey" FOREIGN KEY ("asset_id") REFERENCES "assets"("id") ON DELETE CASCADE ON UPDATE CASCADE;
@@ -236,8 +236,9 @@ model User {
236
236
  kanbanTasksReported KanbanTask[] @relation("KanbanTaskReporter")
237
237
  kanbanTasksAssigned KanbanTask[] @relation("KanbanTaskAssignee")
238
238
  kanbanGoalsCreated KanbanGoal[] @relation("UserToKanbanGoal")
239
- kanbanTaskComments KanbanTaskComment[]
240
- kanbanTaskEvents KanbanTaskEvent[]
239
+ kanbanTaskComments KanbanTaskComment[]
240
+ kanbanTaskEvents KanbanTaskEvent[]
241
+ recentFiles RecentFileItem[]
241
242
 
242
243
  @@map("users")
243
244
  }
@@ -414,6 +415,7 @@ model Project {
414
415
  collections Collection[] @relation("ProjectToCollection")
415
416
  auditLogs AuditLog[] @relation("ProjectToAuditLog")
416
417
  kanbanTasks KanbanTask[] @relation("ProjectToKanbanTask")
418
+ recentFiles RecentFileItem[]
417
419
 
418
420
  @@map("projects")
419
421
  @@index([createdAt])
@@ -564,6 +566,7 @@ model Asset {
564
566
  agentMd AssetAgentMd? @relation("AssetToAgentMd")
565
567
  kanbanTargetTasks KanbanTask[] @relation("KanbanTaskTargetFolder")
566
568
  kanbanTasks KanbanTaskAsset[]
569
+ recentFiles RecentFileItem[]
567
570
 
568
571
  @@map("assets")
569
572
  @@index([type])
@@ -1273,5 +1276,22 @@ model KanbanTaskEvent {
1273
1276
  @@map("kanban_task_events")
1274
1277
  }
1275
1278
 
1279
+ model RecentFileItem {
1280
+ id String @id @default(ulid())
1281
+ userId String @map("user_id")
1282
+ projectId String @map("project_id")
1283
+ assetId String @map("asset_id")
1284
+ viewedAt DateTime @default(now()) @map("viewed_at")
1285
+
1286
+ user User @relation(fields: [userId], references: [id], onDelete: Cascade)
1287
+ project Project @relation(fields: [projectId], references: [id], onDelete: Cascade)
1288
+ asset Asset @relation(fields: [assetId], references: [id], onDelete: Cascade)
1289
+
1290
+ @@unique([userId, projectId, assetId], name: "userIdProjectIdAssetId")
1291
+ @@index([userId, projectId, viewedAt(sort: Desc)])
1292
+ @@index([assetId])
1293
+ @@map("recent_file_items")
1294
+ }
1295
+
1276
1296
 
1277
1297