Skip to content

Commit eeb35b6

Browse files
committed
upp
1 parent 361dc9f commit eeb35b6

1 file changed

Lines changed: 32 additions & 0 deletions

File tree

prisma/schema.prisma

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1425,3 +1425,35 @@ model ConsentRecord {
14251425
@@index([storeId, consentType, granted])
14261426
@@map("consent_records")
14271427
}
1428+
1429+
// ============================================================================
1430+
// EXPORT JOBS (T029 - Async CSV Export)
1431+
// ============================================================================
1432+
1433+
model ExportJob {
1434+
id String @id @default(uuid())
1435+
storeId String
1436+
store Store @relation(fields: [storeId], references: [id], onDelete: Cascade)
1437+
userId String
1438+
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
1439+
1440+
// Export configuration
1441+
type String // "orders", "customers", "products"
1442+
status String // "pending", "processing", "completed", "failed"
1443+
filters String // JSON string of export filters
1444+
totalRows Int
1445+
1446+
// Export result
1447+
fileUrl String? // Vercel Blob Storage URL
1448+
error String? // Error message if failed
1449+
1450+
// Timestamps
1451+
createdAt DateTime @default(now())
1452+
startedAt DateTime?
1453+
completedAt DateTime?
1454+
1455+
@@index([storeId, status, createdAt])
1456+
@@index([userId, createdAt])
1457+
@@map("export_jobs")
1458+
}
1459+

0 commit comments

Comments
 (0)