@hed-hog/operations 0.0.299 → 0.0.301
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/dist/operations.controller.d.ts +713 -31
- package/dist/operations.controller.d.ts.map +1 -1
- package/dist/operations.controller.js +157 -0
- package/dist/operations.controller.js.map +1 -1
- package/dist/operations.module.d.ts.map +1 -1
- package/dist/operations.module.js +5 -1
- package/dist/operations.module.js.map +1 -1
- package/dist/operations.proposal.subscriber.d.ts +11 -0
- package/dist/operations.proposal.subscriber.d.ts.map +1 -0
- package/dist/operations.proposal.subscriber.js +80 -0
- package/dist/operations.proposal.subscriber.js.map +1 -0
- package/dist/operations.proposal.subscriber.spec.d.ts +2 -0
- package/dist/operations.proposal.subscriber.spec.d.ts.map +1 -0
- package/dist/operations.proposal.subscriber.spec.js +88 -0
- package/dist/operations.proposal.subscriber.spec.js.map +1 -0
- package/dist/operations.service.d.ts +490 -46
- package/dist/operations.service.d.ts.map +1 -1
- package/dist/operations.service.js +3590 -1267
- package/dist/operations.service.js.map +1 -1
- package/dist/operations.service.spec.d.ts +2 -0
- package/dist/operations.service.spec.d.ts.map +1 -0
- package/dist/operations.service.spec.js +159 -0
- package/dist/operations.service.spec.js.map +1 -0
- package/hedhog/data/menu.yaml +232 -198
- package/hedhog/data/role.yaml +23 -23
- package/hedhog/data/role_route.yaml +39 -0
- package/hedhog/data/route.yaml +447 -317
- package/hedhog/frontend/app/_components/collaborator-details-screen.tsx.ejs +8 -6
- package/hedhog/frontend/app/_components/collaborator-form-screen.tsx.ejs +1163 -327
- package/hedhog/frontend/app/_components/collaborator-select-with-create.tsx.ejs +256 -0
- package/hedhog/frontend/app/_components/contract-content-editor.tsx.ejs +258 -0
- package/hedhog/frontend/app/_components/contract-creation-wizard.tsx.ejs +631 -0
- package/hedhog/frontend/app/_components/contract-details-screen.tsx.ejs +353 -27
- package/hedhog/frontend/app/_components/contract-form-screen.tsx.ejs +1926 -87
- package/hedhog/frontend/app/_components/contract-template-form-screen.tsx.ejs +526 -0
- package/hedhog/frontend/app/_components/contract-template-select-with-create.tsx.ejs +247 -0
- package/hedhog/frontend/app/_components/contract-wizard-sheet.tsx.ejs +3520 -0
- package/hedhog/frontend/app/_components/department-select-with-create.tsx.ejs +370 -0
- package/hedhog/frontend/app/_components/person-select-with-create.tsx.ejs +826 -0
- package/hedhog/frontend/app/_components/project-form-screen.tsx.ejs +1251 -364
- package/hedhog/frontend/app/_components/section-card.tsx.ejs +48 -13
- package/hedhog/frontend/app/_lib/api.ts.ejs +2 -5
- package/hedhog/frontend/app/_lib/types.ts.ejs +76 -33
- package/hedhog/frontend/app/_lib/utils/format.ts.ejs +85 -8
- package/hedhog/frontend/app/approvals/page.tsx.ejs +90 -54
- package/hedhog/frontend/app/collaborators/[id]/edit/page.tsx.ejs +2 -2
- package/hedhog/frontend/app/collaborators/[id]/page.tsx.ejs +2 -2
- package/hedhog/frontend/app/collaborators/page.tsx.ejs +597 -140
- package/hedhog/frontend/app/contracts/[id]/edit/page.tsx.ejs +2 -2
- package/hedhog/frontend/app/contracts/[id]/page.tsx.ejs +2 -2
- package/hedhog/frontend/app/contracts/page.tsx.ejs +941 -262
- package/hedhog/frontend/app/contracts/templates/page.tsx.ejs +384 -0
- package/hedhog/frontend/app/departments/page.tsx.ejs +442 -0
- package/hedhog/frontend/app/page.tsx.ejs +36 -12
- package/hedhog/frontend/app/projects/[id]/edit/page.tsx.ejs +2 -2
- package/hedhog/frontend/app/projects/new/page.tsx.ejs +2 -2
- package/hedhog/frontend/app/projects/page.tsx.ejs +264 -102
- package/hedhog/frontend/app/schedule-adjustments/page.tsx.ejs +50 -28
- package/hedhog/frontend/app/time-off/page.tsx.ejs +57 -31
- package/hedhog/frontend/app/timesheets/page.tsx.ejs +85 -42
- package/hedhog/frontend/messages/en.json +473 -12
- package/hedhog/frontend/messages/pt.json +528 -66
- package/hedhog/table/operations_approval.yaml +49 -49
- package/hedhog/table/operations_approval_history.yaml +29 -29
- package/hedhog/table/operations_collaborator.yaml +87 -67
- package/hedhog/table/operations_collaborator_schedule_day.yaml +34 -34
- package/hedhog/table/operations_contract.yaml +121 -100
- package/hedhog/table/operations_contract_document.yaml +40 -23
- package/hedhog/table/operations_contract_financial_term.yaml +40 -40
- package/hedhog/table/operations_contract_history.yaml +27 -27
- package/hedhog/table/operations_contract_party.yaml +46 -46
- package/hedhog/table/operations_contract_revision.yaml +38 -38
- package/hedhog/table/operations_contract_signature.yaml +38 -38
- package/hedhog/table/operations_contract_template.yaml +58 -0
- package/hedhog/table/operations_department.yaml +24 -0
- package/hedhog/table/operations_project.yaml +54 -54
- package/hedhog/table/operations_project_assignment.yaml +55 -55
- package/hedhog/table/operations_schedule_adjustment_day.yaml +34 -34
- package/hedhog/table/operations_schedule_adjustment_request.yaml +53 -53
- package/hedhog/table/operations_time_off_request.yaml +57 -57
- package/hedhog/table/operations_timesheet.yaml +41 -41
- package/hedhog/table/operations_timesheet_entry.yaml +40 -40
- package/package.json +5 -3
- package/src/operations.controller.ts +304 -182
- package/src/operations.module.ts +26 -22
- package/src/operations.proposal.subscriber.spec.ts +121 -0
- package/src/operations.proposal.subscriber.ts +86 -0
- package/src/operations.service.spec.ts +210 -0
- package/src/operations.service.ts +7317 -3595
- package/dist/operations-data.controller.d.ts +0 -139
- package/dist/operations-data.controller.d.ts.map +0 -1
- package/dist/operations-data.controller.js +0 -113
- package/dist/operations-data.controller.js.map +0 -1
- package/dist/operations-growth.controller.d.ts +0 -48
- package/dist/operations-growth.controller.d.ts.map +0 -1
- package/dist/operations-growth.controller.js +0 -90
- package/dist/operations-growth.controller.js.map +0 -1
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
columns:
|
|
2
|
-
- type: pk
|
|
3
|
-
- name: target_type
|
|
4
|
-
type: enum
|
|
5
|
-
values: [timesheet, time_off_request, schedule_adjustment_request]
|
|
6
|
-
- name: target_id
|
|
7
|
-
type: int
|
|
8
|
-
- name: requester_collaborator_id
|
|
9
|
-
type: fk
|
|
10
|
-
references:
|
|
11
|
-
table: operations_collaborator
|
|
12
|
-
column: id
|
|
13
|
-
onDelete: CASCADE
|
|
14
|
-
onUpdate: CASCADE
|
|
15
|
-
- name: approver_collaborator_id
|
|
16
|
-
type: fk
|
|
17
|
-
isNullable: true
|
|
18
|
-
references:
|
|
19
|
-
table: operations_collaborator
|
|
20
|
-
column: id
|
|
21
|
-
onDelete: SET NULL
|
|
22
|
-
onUpdate: CASCADE
|
|
23
|
-
- name: status
|
|
24
|
-
type: enum
|
|
25
|
-
values: [pending, approved, rejected, cancelled]
|
|
26
|
-
default: pending
|
|
27
|
-
- name: submitted_at
|
|
28
|
-
type: datetime
|
|
29
|
-
- name: decided_at
|
|
30
|
-
type: datetime
|
|
31
|
-
isNullable: true
|
|
32
|
-
- name: decision_note
|
|
33
|
-
type: text
|
|
34
|
-
isNullable: true
|
|
35
|
-
- name: deleted_at
|
|
36
|
-
type: datetime
|
|
37
|
-
isNullable: true
|
|
38
|
-
- type: created_at
|
|
39
|
-
- type: updated_at
|
|
40
|
-
|
|
41
|
-
indices:
|
|
42
|
-
- columns: [target_type, target_id]
|
|
43
|
-
isUnique: true
|
|
44
|
-
- columns: [requester_collaborator_id]
|
|
45
|
-
- columns: [approver_collaborator_id]
|
|
46
|
-
- columns: [status]
|
|
47
|
-
- columns: [submitted_at]
|
|
48
|
-
- columns: [decided_at]
|
|
49
|
-
- columns: [deleted_at]
|
|
1
|
+
columns:
|
|
2
|
+
- type: pk
|
|
3
|
+
- name: target_type
|
|
4
|
+
type: enum
|
|
5
|
+
values: [timesheet, time_off_request, schedule_adjustment_request]
|
|
6
|
+
- name: target_id
|
|
7
|
+
type: int
|
|
8
|
+
- name: requester_collaborator_id
|
|
9
|
+
type: fk
|
|
10
|
+
references:
|
|
11
|
+
table: operations_collaborator
|
|
12
|
+
column: id
|
|
13
|
+
onDelete: CASCADE
|
|
14
|
+
onUpdate: CASCADE
|
|
15
|
+
- name: approver_collaborator_id
|
|
16
|
+
type: fk
|
|
17
|
+
isNullable: true
|
|
18
|
+
references:
|
|
19
|
+
table: operations_collaborator
|
|
20
|
+
column: id
|
|
21
|
+
onDelete: SET NULL
|
|
22
|
+
onUpdate: CASCADE
|
|
23
|
+
- name: status
|
|
24
|
+
type: enum
|
|
25
|
+
values: [pending, approved, rejected, cancelled]
|
|
26
|
+
default: pending
|
|
27
|
+
- name: submitted_at
|
|
28
|
+
type: datetime
|
|
29
|
+
- name: decided_at
|
|
30
|
+
type: datetime
|
|
31
|
+
isNullable: true
|
|
32
|
+
- name: decision_note
|
|
33
|
+
type: text
|
|
34
|
+
isNullable: true
|
|
35
|
+
- name: deleted_at
|
|
36
|
+
type: datetime
|
|
37
|
+
isNullable: true
|
|
38
|
+
- type: created_at
|
|
39
|
+
- type: updated_at
|
|
40
|
+
|
|
41
|
+
indices:
|
|
42
|
+
- columns: [target_type, target_id]
|
|
43
|
+
isUnique: true
|
|
44
|
+
- columns: [requester_collaborator_id]
|
|
45
|
+
- columns: [approver_collaborator_id]
|
|
46
|
+
- columns: [status]
|
|
47
|
+
- columns: [submitted_at]
|
|
48
|
+
- columns: [decided_at]
|
|
49
|
+
- columns: [deleted_at]
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
columns:
|
|
2
|
-
- type: pk
|
|
3
|
-
- name: approval_id
|
|
4
|
-
type: fk
|
|
5
|
-
references:
|
|
6
|
-
table: operations_approval
|
|
7
|
-
column: id
|
|
8
|
-
onDelete: CASCADE
|
|
9
|
-
onUpdate: CASCADE
|
|
10
|
-
- name: actor_collaborator_id
|
|
11
|
-
type: fk
|
|
12
|
-
isNullable: true
|
|
13
|
-
references:
|
|
14
|
-
table: operations_collaborator
|
|
15
|
-
column: id
|
|
16
|
-
onDelete: SET NULL
|
|
17
|
-
onUpdate: CASCADE
|
|
18
|
-
- name: action
|
|
19
|
-
type: enum
|
|
20
|
-
values: [created, submitted, approved, rejected, cancelled, reopened]
|
|
21
|
-
- name: note
|
|
22
|
-
type: text
|
|
23
|
-
isNullable: true
|
|
24
|
-
- type: created_at
|
|
25
|
-
|
|
26
|
-
indices:
|
|
27
|
-
- columns: [approval_id]
|
|
28
|
-
- columns: [actor_collaborator_id]
|
|
29
|
-
- columns: [action]
|
|
1
|
+
columns:
|
|
2
|
+
- type: pk
|
|
3
|
+
- name: approval_id
|
|
4
|
+
type: fk
|
|
5
|
+
references:
|
|
6
|
+
table: operations_approval
|
|
7
|
+
column: id
|
|
8
|
+
onDelete: CASCADE
|
|
9
|
+
onUpdate: CASCADE
|
|
10
|
+
- name: actor_collaborator_id
|
|
11
|
+
type: fk
|
|
12
|
+
isNullable: true
|
|
13
|
+
references:
|
|
14
|
+
table: operations_collaborator
|
|
15
|
+
column: id
|
|
16
|
+
onDelete: SET NULL
|
|
17
|
+
onUpdate: CASCADE
|
|
18
|
+
- name: action
|
|
19
|
+
type: enum
|
|
20
|
+
values: [created, submitted, approved, rejected, cancelled, reopened]
|
|
21
|
+
- name: note
|
|
22
|
+
type: text
|
|
23
|
+
isNullable: true
|
|
24
|
+
- type: created_at
|
|
25
|
+
|
|
26
|
+
indices:
|
|
27
|
+
- columns: [approval_id]
|
|
28
|
+
- columns: [actor_collaborator_id]
|
|
29
|
+
- columns: [action]
|
|
@@ -1,67 +1,87 @@
|
|
|
1
|
-
columns:
|
|
2
|
-
- type: pk
|
|
3
|
-
- name: user_id
|
|
4
|
-
type: int
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
- name:
|
|
45
|
-
type:
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
-
|
|
1
|
+
columns:
|
|
2
|
+
- type: pk
|
|
3
|
+
- name: user_id
|
|
4
|
+
type: int
|
|
5
|
+
isNullable: true
|
|
6
|
+
- name: person_id
|
|
7
|
+
type: fk
|
|
8
|
+
isNullable: true
|
|
9
|
+
references:
|
|
10
|
+
table: person
|
|
11
|
+
column: id
|
|
12
|
+
onDelete: SET NULL
|
|
13
|
+
onUpdate: CASCADE
|
|
14
|
+
- name: supervisor_collaborator_id
|
|
15
|
+
type: fk
|
|
16
|
+
isNullable: true
|
|
17
|
+
references:
|
|
18
|
+
table: operations_collaborator
|
|
19
|
+
column: id
|
|
20
|
+
onDelete: SET NULL
|
|
21
|
+
onUpdate: CASCADE
|
|
22
|
+
- name: code
|
|
23
|
+
type: varchar
|
|
24
|
+
length: 32
|
|
25
|
+
- name: collaborator_type
|
|
26
|
+
type: enum
|
|
27
|
+
values: [clt, pj, freelancer, intern, other]
|
|
28
|
+
default: other
|
|
29
|
+
- name: display_name
|
|
30
|
+
type: varchar
|
|
31
|
+
length: 180
|
|
32
|
+
- name: department
|
|
33
|
+
type: varchar
|
|
34
|
+
length: 120
|
|
35
|
+
isNullable: true
|
|
36
|
+
- name: department_id
|
|
37
|
+
type: fk
|
|
38
|
+
isNullable: true
|
|
39
|
+
references:
|
|
40
|
+
table: operations_department
|
|
41
|
+
column: id
|
|
42
|
+
onDelete: SET NULL
|
|
43
|
+
onUpdate: CASCADE
|
|
44
|
+
- name: title
|
|
45
|
+
type: varchar
|
|
46
|
+
length: 120
|
|
47
|
+
isNullable: true
|
|
48
|
+
- name: level_label
|
|
49
|
+
type: varchar
|
|
50
|
+
length: 120
|
|
51
|
+
isNullable: true
|
|
52
|
+
- name: weekly_capacity_hours
|
|
53
|
+
type: decimal
|
|
54
|
+
precision: 6
|
|
55
|
+
scale: 2
|
|
56
|
+
isNullable: true
|
|
57
|
+
- name: status
|
|
58
|
+
type: enum
|
|
59
|
+
values: [active, on_leave, inactive]
|
|
60
|
+
default: active
|
|
61
|
+
- name: joined_at
|
|
62
|
+
type: date
|
|
63
|
+
isNullable: true
|
|
64
|
+
- name: left_at
|
|
65
|
+
type: date
|
|
66
|
+
isNullable: true
|
|
67
|
+
- name: notes
|
|
68
|
+
type: text
|
|
69
|
+
isNullable: true
|
|
70
|
+
- name: deleted_at
|
|
71
|
+
type: datetime
|
|
72
|
+
isNullable: true
|
|
73
|
+
- type: created_at
|
|
74
|
+
- type: updated_at
|
|
75
|
+
|
|
76
|
+
indices:
|
|
77
|
+
- columns: [user_id]
|
|
78
|
+
isUnique: true
|
|
79
|
+
- columns: [person_id]
|
|
80
|
+
isUnique: true
|
|
81
|
+
- columns: [code]
|
|
82
|
+
isUnique: true
|
|
83
|
+
- columns: [collaborator_type]
|
|
84
|
+
- columns: [supervisor_collaborator_id]
|
|
85
|
+
- columns: [department_id]
|
|
86
|
+
- columns: [status]
|
|
87
|
+
- columns: [deleted_at]
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
columns:
|
|
2
|
-
- type: pk
|
|
3
|
-
- name: collaborator_id
|
|
4
|
-
type: fk
|
|
5
|
-
references:
|
|
6
|
-
table: operations_collaborator
|
|
7
|
-
column: id
|
|
8
|
-
onDelete: CASCADE
|
|
9
|
-
onUpdate: CASCADE
|
|
10
|
-
- name: weekday
|
|
11
|
-
type: enum
|
|
12
|
-
values: [monday, tuesday, wednesday, thursday, friday, saturday, sunday]
|
|
13
|
-
- name: is_working_day
|
|
14
|
-
type: boolean
|
|
15
|
-
default: true
|
|
16
|
-
- name: start_time
|
|
17
|
-
type: time
|
|
18
|
-
isNullable: true
|
|
19
|
-
- name: end_time
|
|
20
|
-
type: time
|
|
21
|
-
isNullable: true
|
|
22
|
-
- name: break_minutes
|
|
23
|
-
type: int
|
|
24
|
-
isNullable: true
|
|
25
|
-
- name: deleted_at
|
|
26
|
-
type: datetime
|
|
27
|
-
isNullable: true
|
|
28
|
-
- type: created_at
|
|
29
|
-
- type: updated_at
|
|
30
|
-
|
|
31
|
-
indices:
|
|
32
|
-
- columns: [collaborator_id]
|
|
33
|
-
- columns: [weekday]
|
|
34
|
-
- columns: [deleted_at]
|
|
1
|
+
columns:
|
|
2
|
+
- type: pk
|
|
3
|
+
- name: collaborator_id
|
|
4
|
+
type: fk
|
|
5
|
+
references:
|
|
6
|
+
table: operations_collaborator
|
|
7
|
+
column: id
|
|
8
|
+
onDelete: CASCADE
|
|
9
|
+
onUpdate: CASCADE
|
|
10
|
+
- name: weekday
|
|
11
|
+
type: enum
|
|
12
|
+
values: [monday, tuesday, wednesday, thursday, friday, saturday, sunday]
|
|
13
|
+
- name: is_working_day
|
|
14
|
+
type: boolean
|
|
15
|
+
default: true
|
|
16
|
+
- name: start_time
|
|
17
|
+
type: time
|
|
18
|
+
isNullable: true
|
|
19
|
+
- name: end_time
|
|
20
|
+
type: time
|
|
21
|
+
isNullable: true
|
|
22
|
+
- name: break_minutes
|
|
23
|
+
type: int
|
|
24
|
+
isNullable: true
|
|
25
|
+
- name: deleted_at
|
|
26
|
+
type: datetime
|
|
27
|
+
isNullable: true
|
|
28
|
+
- type: created_at
|
|
29
|
+
- type: updated_at
|
|
30
|
+
|
|
31
|
+
indices:
|
|
32
|
+
- columns: [collaborator_id]
|
|
33
|
+
- columns: [weekday]
|
|
34
|
+
- columns: [deleted_at]
|
|
@@ -1,88 +1,106 @@
|
|
|
1
|
-
columns:
|
|
2
|
-
- type: pk
|
|
3
|
-
- name: code
|
|
4
|
-
type: varchar
|
|
5
|
-
length: 40
|
|
6
|
-
- name: name
|
|
7
|
-
type: varchar
|
|
8
|
-
length: 180
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
isNullable: true
|
|
70
|
-
- name:
|
|
71
|
-
type:
|
|
72
|
-
isNullable: true
|
|
73
|
-
- name:
|
|
74
|
-
type:
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
1
|
+
columns:
|
|
2
|
+
- type: pk
|
|
3
|
+
- name: code
|
|
4
|
+
type: varchar
|
|
5
|
+
length: 40
|
|
6
|
+
- name: name
|
|
7
|
+
type: varchar
|
|
8
|
+
length: 180
|
|
9
|
+
isNullable: true
|
|
10
|
+
- name: contract_category
|
|
11
|
+
type: enum
|
|
12
|
+
values: [employee, contractor, client, supplier, vendor, partner, internal, other]
|
|
13
|
+
default: client
|
|
14
|
+
- name: contract_type
|
|
15
|
+
type: enum
|
|
16
|
+
values: [clt, pj, freelancer_agreement, service_agreement, fixed_term, recurring_service, nda, amendment, addendum, other]
|
|
17
|
+
default: service_agreement
|
|
18
|
+
- name: client_name
|
|
19
|
+
type: varchar
|
|
20
|
+
length: 180
|
|
21
|
+
isNullable: true
|
|
22
|
+
- name: signature_status
|
|
23
|
+
type: enum
|
|
24
|
+
values: [not_started, pending, partially_signed, signed, expired]
|
|
25
|
+
default: not_started
|
|
26
|
+
- name: is_active
|
|
27
|
+
type: boolean
|
|
28
|
+
default: true
|
|
29
|
+
- name: billing_model
|
|
30
|
+
type: enum
|
|
31
|
+
values: [time_and_material, monthly_retainer, fixed_price]
|
|
32
|
+
default: time_and_material
|
|
33
|
+
- name: account_manager_collaborator_id
|
|
34
|
+
type: fk
|
|
35
|
+
isNullable: true
|
|
36
|
+
references:
|
|
37
|
+
table: operations_collaborator
|
|
38
|
+
column: id
|
|
39
|
+
onDelete: SET NULL
|
|
40
|
+
onUpdate: CASCADE
|
|
41
|
+
- name: related_collaborator_id
|
|
42
|
+
type: fk
|
|
43
|
+
isNullable: true
|
|
44
|
+
references:
|
|
45
|
+
table: operations_collaborator
|
|
46
|
+
column: id
|
|
47
|
+
onDelete: SET NULL
|
|
48
|
+
onUpdate: CASCADE
|
|
49
|
+
- name: contract_template_id
|
|
50
|
+
type: fk
|
|
51
|
+
isNullable: true
|
|
52
|
+
references:
|
|
53
|
+
table: operations_contract_template
|
|
54
|
+
column: id
|
|
55
|
+
onDelete: SET NULL
|
|
56
|
+
onUpdate: CASCADE
|
|
57
|
+
- name: origin_type
|
|
58
|
+
type: enum
|
|
59
|
+
values: [manual, employee_hiring, client_project, crm_proposal]
|
|
60
|
+
default: manual
|
|
61
|
+
- name: origin_id
|
|
62
|
+
type: int
|
|
63
|
+
isNullable: true
|
|
64
|
+
- name: start_date
|
|
65
|
+
type: date
|
|
66
|
+
isNullable: true
|
|
67
|
+
- name: end_date
|
|
68
|
+
type: date
|
|
69
|
+
isNullable: true
|
|
70
|
+
- name: signed_at
|
|
71
|
+
type: date
|
|
72
|
+
isNullable: true
|
|
73
|
+
- name: effective_date
|
|
74
|
+
type: date
|
|
75
|
+
isNullable: true
|
|
76
|
+
- name: budget_amount
|
|
77
|
+
type: decimal
|
|
78
|
+
precision: 12
|
|
79
|
+
scale: 2
|
|
80
|
+
isNullable: true
|
|
81
|
+
- name: monthly_hour_cap
|
|
82
|
+
type: int
|
|
83
|
+
isNullable: true
|
|
84
|
+
- name: status
|
|
85
|
+
type: enum
|
|
86
|
+
values: [draft, under_review, active, renewal, expired, closed, archived]
|
|
87
|
+
default: draft
|
|
88
|
+
- name: creation_mode
|
|
89
|
+
type: enum
|
|
90
|
+
values: [blank, template, upload, duplicate]
|
|
91
|
+
default: blank
|
|
92
|
+
- name: wizard_step
|
|
93
|
+
type: int
|
|
94
|
+
default: 0
|
|
95
|
+
- name: description
|
|
96
|
+
type: text
|
|
97
|
+
isNullable: true
|
|
98
|
+
- name: content_html
|
|
99
|
+
type: text
|
|
100
|
+
isNullable: true
|
|
101
|
+
- name: created_by_user_id
|
|
102
|
+
type: int
|
|
103
|
+
isNullable: true
|
|
86
104
|
- name: updated_by_user_id
|
|
87
105
|
type: int
|
|
88
106
|
isNullable: true
|
|
@@ -92,18 +110,21 @@ columns:
|
|
|
92
110
|
- type: created_at
|
|
93
111
|
- type: updated_at
|
|
94
112
|
|
|
95
|
-
indices:
|
|
96
|
-
- columns: [code]
|
|
97
|
-
isUnique: true
|
|
98
|
-
- columns: [account_manager_collaborator_id]
|
|
99
|
-
- columns: [related_collaborator_id]
|
|
100
|
-
- columns: [
|
|
101
|
-
- columns: [
|
|
102
|
-
- columns: [
|
|
103
|
-
- columns: [
|
|
104
|
-
- columns: [
|
|
105
|
-
- columns: [
|
|
106
|
-
- columns: [
|
|
107
|
-
- columns: [
|
|
108
|
-
- columns: [
|
|
109
|
-
- columns: [
|
|
113
|
+
indices:
|
|
114
|
+
- columns: [code]
|
|
115
|
+
isUnique: true
|
|
116
|
+
- columns: [account_manager_collaborator_id]
|
|
117
|
+
- columns: [related_collaborator_id]
|
|
118
|
+
- columns: [contract_template_id]
|
|
119
|
+
- columns: [contract_category]
|
|
120
|
+
- columns: [contract_type]
|
|
121
|
+
- columns: [origin_type]
|
|
122
|
+
- columns: [origin_id]
|
|
123
|
+
- columns: [signature_status]
|
|
124
|
+
- columns: [is_active]
|
|
125
|
+
- columns: [status]
|
|
126
|
+
- columns: [creation_mode]
|
|
127
|
+
- columns: [wizard_step]
|
|
128
|
+
- columns: [start_date]
|
|
129
|
+
- columns: [end_date]
|
|
130
|
+
- columns: [deleted_at]
|