Refresh HiveGrid Cloud reference snapshot
This commit is contained in:
1 parent
5e99e14772
commit
7f88026f79
5955 files changed
+1177325
-188362
No files matched your search
@@ -55,6 +55,12 @@ model FormSubmission {
|
||||
id String @id @default(cuid())
|
||||
formId String
|
||||
tenantId String
|
||||
/// Authenticated submissions have exactly one internal or PortalUser actor.
|
||||
/// The merge migration adds the database CHECK after legacy public-form
|
||||
/// backfill; portal services enforce the invariant immediately.
|
||||
createdByUserId String?
|
||||
createdByPortalUserId String?
|
||||
projectId String?
|
||||
/// Validated payload as { values: Record<string, string|number|boolean|null> }.
|
||||
payload Json
|
||||
/// Origin header recorded at submission time, for audit / forensics.
|
||||
@@ -74,6 +80,7 @@ model FormSubmission {
|
||||
updatedAt DateTime @updatedAt
|
||||
|
||||
form Form @relation(fields: [formId], references: [id], onDelete: Cascade)
|
||||
createdByPortalUser PortalUser? @relation("PortalFormSubmissionActor", fields: [createdByPortalUserId, tenantId], references: [id, tenantId], onDelete: Restrict)
|
||||
files FormFile[]
|
||||
actionLogs FormActionLog[]
|
||||
|
||||
@@ -82,6 +89,8 @@ model FormSubmission {
|
||||
@@index([tenantId, createdAt(sort: Desc)])
|
||||
@@index([status])
|
||||
@@index([tenantId, linkedEntityType, linkedEntityId])
|
||||
@@index([tenantId, createdByPortalUserId, createdAt(sort: Desc)])
|
||||
@@index([tenantId, projectId, createdAt(sort: Desc)])
|
||||
}
|
||||
|
||||
enum FormStatus {
|
||||
@@ -97,6 +106,11 @@ enum FormSubtype {
|
||||
survey
|
||||
booking_intake
|
||||
hr_request
|
||||
/// WF-P16 S01 type selection: submissions feed the lead inbox by default.
|
||||
lead
|
||||
/// WF-P16 S01 type selection: staff-only form without a public link.
|
||||
internal
|
||||
portal_form
|
||||
}
|
||||
|
||||
enum FormFieldType {
|
||||
@@ -125,6 +139,7 @@ enum FormActionType {
|
||||
send_email_to_submitter
|
||||
webhook
|
||||
trigger_automation
|
||||
start_double_opt_in
|
||||
}
|
||||
|
||||
enum FormActionLogStatus {
|
||||
|
||||
Reference in new issue
Block a user