mirror of
https://github.com/documenso/documenso.git
synced 2026-07-27 02:15:05 +10:00
chore: merge main
This commit is contained in:
@@ -188,11 +188,30 @@ model Document {
|
||||
teamId Int?
|
||||
team Team? @relation(fields: [teamId], references: [id])
|
||||
|
||||
auditLogs DocumentAuditLog[]
|
||||
|
||||
@@unique([documentDataId])
|
||||
@@index([userId])
|
||||
@@index([status])
|
||||
}
|
||||
|
||||
model DocumentAuditLog {
|
||||
id String @id @default(cuid())
|
||||
documentId Int
|
||||
createdAt DateTime @default(now())
|
||||
type String
|
||||
data Json
|
||||
|
||||
// Details of the person who performed the action which caused the audit log.
|
||||
name String?
|
||||
email String?
|
||||
userId Int?
|
||||
userAgent String?
|
||||
ipAddress String?
|
||||
|
||||
Document Document @relation(fields: [documentId], references: [id], onDelete: Cascade)
|
||||
}
|
||||
|
||||
enum DocumentDataType {
|
||||
S3_PATH
|
||||
BYTES
|
||||
@@ -217,6 +236,7 @@ model DocumentMeta {
|
||||
dateFormat String? @default("yyyy-MM-dd hh:mm a") @db.Text
|
||||
documentId Int @unique
|
||||
document Document @relation(fields: [documentId], references: [id], onDelete: Cascade)
|
||||
redirectUrl String?
|
||||
}
|
||||
|
||||
enum ReadStatus {
|
||||
@@ -277,6 +297,7 @@ enum FieldType {
|
||||
|
||||
model Field {
|
||||
id Int @id @default(autoincrement())
|
||||
secondaryId String @unique @default(cuid())
|
||||
documentId Int?
|
||||
templateId Int?
|
||||
recipientId Int?
|
||||
@@ -352,7 +373,8 @@ model Team {
|
||||
owner User @relation(fields: [ownerUserId], references: [id])
|
||||
subscription Subscription?
|
||||
|
||||
document Document[]
|
||||
document Document[]
|
||||
templates Template[]
|
||||
}
|
||||
|
||||
model TeamPending {
|
||||
@@ -433,10 +455,12 @@ model Template {
|
||||
type TemplateType @default(PRIVATE)
|
||||
title String
|
||||
userId Int
|
||||
teamId Int?
|
||||
templateDocumentDataId String
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @default(now()) @updatedAt
|
||||
|
||||
team Team? @relation(fields: [teamId], references: [id], onDelete: Cascade)
|
||||
templateDocumentData DocumentData @relation(fields: [templateDocumentDataId], references: [id], onDelete: Cascade)
|
||||
User User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
||||
Recipient Recipient[]
|
||||
|
||||
Reference in New Issue
Block a user