@adaptware/eagles-db 0.5.39 → 0.5.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client/edge.js +231 -5
- package/client/index-browser.js +228 -2
- package/client/index.d.ts +107666 -86251
- package/client/index.js +231 -5
- package/client/package.json +1 -1
- package/client/schema.prisma +457 -96
- package/client/wasm.js +231 -5
- package/package.json +1 -1
- package/prisma/schema/jobApplicationFields.prisma +19 -15
- package/prisma/schema/jobApplicationResponse.prisma +7 -5
package/package.json
CHANGED
|
@@ -12,29 +12,33 @@ enum JobApplicationFieldType {
|
|
|
12
12
|
|
|
13
13
|
model JobApplicationField {
|
|
14
14
|
/// Primary key (UUID)
|
|
15
|
-
id
|
|
15
|
+
id String @id @default(uuid())
|
|
16
16
|
/// Foreign keys
|
|
17
|
-
organisation_id
|
|
18
|
-
template_id
|
|
17
|
+
organisation_id String
|
|
18
|
+
template_id String
|
|
19
19
|
/// Data fields
|
|
20
|
-
field_type
|
|
21
|
-
label
|
|
22
|
-
description
|
|
23
|
-
is_mandatory
|
|
24
|
-
is_draft
|
|
25
|
-
options
|
|
20
|
+
field_type JobApplicationFieldType
|
|
21
|
+
label String
|
|
22
|
+
description String?
|
|
23
|
+
is_mandatory Boolean @default(false)
|
|
24
|
+
is_draft Boolean @default(true)
|
|
25
|
+
options String[]
|
|
26
26
|
/// Audit fields
|
|
27
|
-
is_active
|
|
28
|
-
created_by
|
|
29
|
-
updated_by
|
|
30
|
-
created_at
|
|
31
|
-
updated_at
|
|
27
|
+
is_active Boolean @default(true)
|
|
28
|
+
created_by String
|
|
29
|
+
updated_by String
|
|
30
|
+
created_at DateTime @default(now())
|
|
31
|
+
updated_at DateTime @updatedAt
|
|
32
|
+
|
|
33
|
+
/// order of question
|
|
34
|
+
order_no Int? //nullable for now to allow migration
|
|
35
|
+
|
|
32
36
|
/// Relations
|
|
33
37
|
organisation Organisation @relation(fields: [organisation_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
34
38
|
job_application_template JobApplicationTemplate @relation(fields: [template_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
35
39
|
job_application_responses JobApplicationResponse[]
|
|
36
40
|
|
|
37
41
|
/// Indexes
|
|
38
|
-
@@index([organisation_id, template_id])
|
|
42
|
+
@@index([organisation_id, template_id, order_no])
|
|
39
43
|
@@schema("public")
|
|
40
44
|
}
|
|
@@ -22,13 +22,15 @@ model JobApplicationResponse {
|
|
|
22
22
|
created_by String
|
|
23
23
|
updated_by String
|
|
24
24
|
is_active Boolean @default(true)
|
|
25
|
+
order_no Int? //nullable for now to allow migration
|
|
26
|
+
|
|
25
27
|
/// Relations
|
|
26
|
-
application
|
|
27
|
-
field
|
|
28
|
-
document
|
|
28
|
+
application Application @relation(fields: [application_id], references: [id], onDelete: Cascade, onUpdate: Cascade)
|
|
29
|
+
field JobApplicationField? @relation(fields: [job_application_field_id], references: [id], onDelete: Restrict, onUpdate: Cascade)
|
|
30
|
+
document Document? @relation(fields: [document_id], references: [id], onDelete: SetNull, onUpdate: Cascade)
|
|
29
31
|
|
|
30
|
-
|
|
31
|
-
@@index([application_id])
|
|
32
|
+
// / Partial unique on (application_id, job_application_field_id) WHERE job_application_field_id IS NOT NULL — see migration SQL
|
|
33
|
+
@@index([application_id, is_active, order_no])
|
|
32
34
|
@@index([job_application_field_id])
|
|
33
35
|
@@schema("public")
|
|
34
36
|
}
|