mirror of
https://github.com/documenso/documenso.git
synced 2026-06-22 04:12:06 +10:00
feat: add attachments (#2091)
This commit is contained in:
@@ -422,6 +422,8 @@ model Envelope {
|
||||
|
||||
documentMetaId String @unique
|
||||
documentMeta DocumentMeta @relation(fields: [documentMetaId], references: [id])
|
||||
|
||||
envelopeAttachments EnvelopeAttachment[]
|
||||
}
|
||||
|
||||
model EnvelopeItem {
|
||||
@@ -508,6 +510,22 @@ model DocumentMeta {
|
||||
envelope Envelope?
|
||||
}
|
||||
|
||||
/// @zod.import(["import { ZEnvelopeAttachmentTypeSchema } from '@documenso/lib/types/envelope-attachment';"])
|
||||
model EnvelopeAttachment {
|
||||
id String @id @default(cuid())
|
||||
|
||||
type String /// [EnvelopeAttachmentType] @zod.custom.use(ZEnvelopeAttachmentTypeSchema)
|
||||
label String
|
||||
|
||||
data String
|
||||
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
|
||||
envelopeId String
|
||||
envelope Envelope @relation(fields: [envelopeId], references: [id], onDelete: Cascade)
|
||||
}
|
||||
|
||||
enum ReadStatus {
|
||||
NOT_OPENED
|
||||
OPENED
|
||||
|
||||
Reference in New Issue
Block a user