mirror of
https://github.com/documenso/documenso.git
synced 2025-11-16 09:41:35 +10:00
feat: add completed at timestamp
This commit is contained in:
@ -94,6 +94,7 @@ export const completeDocumentWithToken = async ({
|
|||||||
},
|
},
|
||||||
data: {
|
data: {
|
||||||
status: DocumentStatus.COMPLETED,
|
status: DocumentStatus.COMPLETED,
|
||||||
|
completedAt: new Date(),
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@ -0,0 +1,4 @@
|
|||||||
|
-- AlterTable
|
||||||
|
ALTER TABLE "Document" ADD COLUMN "completedAt" TIMESTAMP(3);
|
||||||
|
|
||||||
|
UPDATE "Document" SET "completedAt" = "updatedAt" WHERE "status" = 'COMPLETED';
|
||||||
@ -120,6 +120,7 @@ model Document {
|
|||||||
documentMeta DocumentMeta?
|
documentMeta DocumentMeta?
|
||||||
createdAt DateTime @default(now())
|
createdAt DateTime @default(now())
|
||||||
updatedAt DateTime @default(now()) @updatedAt
|
updatedAt DateTime @default(now()) @updatedAt
|
||||||
|
completedAt DateTime?
|
||||||
|
|
||||||
@@unique([documentDataId])
|
@@unique([documentDataId])
|
||||||
@@index([userId])
|
@@index([userId])
|
||||||
|
|||||||
Reference in New Issue
Block a user