@hed-hog/operations 0.0.295 → 0.0.296
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 +415 -0
- package/dist/operations.controller.d.ts.map +1 -0
- package/dist/operations.controller.js +333 -0
- package/dist/operations.controller.js.map +1 -0
- package/dist/operations.module.d.ts.map +1 -1
- package/dist/operations.module.js +4 -3
- package/dist/operations.module.js.map +1 -1
- package/dist/operations.service.d.ts +589 -153
- package/dist/operations.service.d.ts.map +1 -1
- package/dist/operations.service.js +2229 -100
- package/dist/operations.service.js.map +1 -1
- package/hedhog/data/menu.yaml +198 -251
- package/hedhog/data/role.yaml +23 -14
- package/hedhog/data/route.yaml +317 -143
- package/hedhog/frontend/app/_components/collaborator-details-screen.tsx.ejs +310 -0
- package/hedhog/frontend/app/_components/collaborator-form-screen.tsx.ejs +631 -0
- package/hedhog/frontend/app/_components/contract-details-screen.tsx.ejs +132 -0
- package/hedhog/frontend/app/_components/contract-form-screen.tsx.ejs +558 -0
- package/hedhog/frontend/app/_components/project-details-screen.tsx.ejs +291 -0
- package/hedhog/frontend/app/_components/project-form-screen.tsx.ejs +689 -0
- package/hedhog/frontend/app/_lib/api.ts.ejs +32 -0
- package/hedhog/frontend/app/_lib/hooks/use-operations-access.ts.ejs +44 -0
- package/hedhog/frontend/app/_lib/types.ts.ejs +360 -0
- package/hedhog/frontend/app/_lib/utils/format.ts.ejs +129 -25
- package/hedhog/frontend/app/_lib/utils/forms.ts.ejs +14 -0
- package/hedhog/frontend/app/approvals/page.tsx.ejs +386 -147
- package/hedhog/frontend/app/collaborators/[id]/edit/page.tsx.ejs +11 -0
- package/hedhog/frontend/app/collaborators/[id]/page.tsx.ejs +11 -0
- package/hedhog/frontend/app/collaborators/new/page.tsx.ejs +5 -0
- package/hedhog/frontend/app/collaborators/page.tsx.ejs +261 -0
- package/hedhog/frontend/app/contracts/[id]/edit/page.tsx.ejs +11 -0
- package/hedhog/frontend/app/contracts/[id]/page.tsx.ejs +11 -108
- package/hedhog/frontend/app/contracts/new/page.tsx.ejs +17 -0
- package/hedhog/frontend/app/contracts/page.tsx.ejs +262 -181
- package/hedhog/frontend/app/page.tsx.ejs +319 -177
- package/hedhog/frontend/app/projects/[id]/edit/page.tsx.ejs +11 -0
- package/hedhog/frontend/app/projects/[id]/page.tsx.ejs +11 -936
- package/hedhog/frontend/app/projects/new/page.tsx.ejs +5 -0
- package/hedhog/frontend/app/projects/page.tsx.ejs +236 -1074
- package/hedhog/frontend/app/schedule-adjustments/page.tsx.ejs +418 -0
- package/hedhog/frontend/app/team/page.tsx.ejs +339 -0
- package/hedhog/frontend/app/time-off/page.tsx.ejs +328 -0
- package/hedhog/frontend/app/timesheets/page.tsx.ejs +636 -126
- package/hedhog/frontend/messages/en.json +648 -454
- package/hedhog/frontend/messages/pt.json +647 -454
- package/hedhog/table/operations_approval.yaml +49 -0
- package/hedhog/table/operations_approval_history.yaml +29 -0
- package/hedhog/table/{operations_employee.yaml → operations_collaborator.yaml} +67 -64
- package/hedhog/table/operations_collaborator_schedule_day.yaml +34 -0
- package/hedhog/table/operations_contract.yaml +100 -48
- package/hedhog/table/operations_contract_document.yaml +39 -0
- package/hedhog/table/operations_contract_financial_term.yaml +40 -0
- package/hedhog/table/operations_contract_history.yaml +27 -0
- package/hedhog/table/operations_contract_party.yaml +46 -0
- package/hedhog/table/operations_contract_revision.yaml +38 -0
- package/hedhog/table/operations_contract_signature.yaml +38 -0
- package/hedhog/table/operations_project.yaml +54 -50
- package/hedhog/table/{operations_allocation.yaml → operations_project_assignment.yaml} +55 -52
- package/hedhog/table/operations_schedule_adjustment_day.yaml +34 -0
- package/hedhog/table/operations_schedule_adjustment_request.yaml +53 -0
- package/hedhog/table/operations_time_off_request.yaml +57 -0
- package/hedhog/table/operations_timesheet.yaml +41 -36
- package/hedhog/table/operations_timesheet_entry.yaml +40 -50
- package/package.json +8 -7
- package/src/operations.controller.ts +182 -0
- package/src/operations.module.ts +22 -21
- package/src/operations.service.ts +3595 -137
- package/hedhog/data/operations_career_level.yaml +0 -102
- package/hedhog/data/operations_career_track.yaml +0 -8
- package/hedhog/data/operations_certification.yaml +0 -38
- package/hedhog/data/operations_evaluation_cycle.yaml +0 -18
- package/hedhog/data/operations_performance_criterion.yaml +0 -48
- package/hedhog/frontend/app/_components/allocation-calendar.tsx.ejs +0 -56
- package/hedhog/frontend/app/_components/kanban-board.tsx.ejs +0 -626
- package/hedhog/frontend/app/_components/timesheet-entry-dialog.tsx.ejs +0 -142
- package/hedhog/frontend/app/_lib/hooks/use-operations-data.ts.ejs +0 -41
- package/hedhog/frontend/app/_lib/hooks/use-operations-growth-data.ts.ejs +0 -63
- package/hedhog/frontend/app/_lib/mocks/allocations.mock.ts.ejs +0 -74
- package/hedhog/frontend/app/_lib/mocks/contracts.mock.ts.ejs +0 -74
- package/hedhog/frontend/app/_lib/mocks/operations-growth.mock.ts.ejs +0 -824
- package/hedhog/frontend/app/_lib/mocks/projects.mock.ts.ejs +0 -455
- package/hedhog/frontend/app/_lib/mocks/tasks.mock.ts.ejs +0 -117
- package/hedhog/frontend/app/_lib/mocks/timesheets.mock.ts.ejs +0 -84
- package/hedhog/frontend/app/_lib/mocks/users.mock.ts.ejs +0 -67
- package/hedhog/frontend/app/_lib/services/contracts.service.ts.ejs +0 -10
- package/hedhog/frontend/app/_lib/services/operations-growth.service.ts.ejs +0 -31
- package/hedhog/frontend/app/_lib/services/projects.service.ts.ejs +0 -10
- package/hedhog/frontend/app/_lib/services/tasks.service.ts.ejs +0 -10
- package/hedhog/frontend/app/_lib/services/timesheets.service.ts.ejs +0 -10
- package/hedhog/frontend/app/_lib/types/operations-growth.ts.ejs +0 -209
- package/hedhog/frontend/app/_lib/types/operations.ts.ejs +0 -156
- package/hedhog/frontend/app/_lib/utils/growth.ts.ejs +0 -62
- package/hedhog/frontend/app/_lib/utils/metrics.ts.ejs +0 -103
- package/hedhog/frontend/app/_lib/utils/status.ts.ejs +0 -80
- package/hedhog/frontend/app/allocations/page.tsx.ejs +0 -155
- package/hedhog/frontend/app/career/page.tsx.ejs +0 -143
- package/hedhog/frontend/app/certifications/page.tsx.ejs +0 -202
- package/hedhog/frontend/app/evaluations/page.tsx.ejs +0 -278
- package/hedhog/frontend/app/goals/page.tsx.ejs +0 -171
- package/hedhog/frontend/app/growth/page.tsx.ejs +0 -288
- package/hedhog/frontend/app/manager/page.tsx.ejs +0 -175
- package/hedhog/frontend/app/rewards/page.tsx.ejs +0 -196
- package/hedhog/frontend/app/tasks/page.tsx.ejs +0 -999
- package/hedhog/table/operations_calibration_item.yaml +0 -61
- package/hedhog/table/operations_calibration_session.yaml +0 -25
- package/hedhog/table/operations_career_level.yaml +0 -75
- package/hedhog/table/operations_career_track.yaml +0 -21
- package/hedhog/table/operations_certification.yaml +0 -48
- package/hedhog/table/operations_employee_certification.yaml +0 -43
- package/hedhog/table/operations_employee_connect.yaml +0 -61
- package/hedhog/table/operations_employee_evaluation.yaml +0 -113
- package/hedhog/table/operations_employee_evaluation_item.yaml +0 -39
- package/hedhog/table/operations_employee_profile.yaml +0 -80
- package/hedhog/table/operations_employee_skill_matrix.yaml +0 -30
- package/hedhog/table/operations_evaluation_cycle.yaml +0 -31
- package/hedhog/table/operations_goal.yaml +0 -67
- package/hedhog/table/operations_goal_progress.yaml +0 -31
- package/hedhog/table/operations_performance_criterion.yaml +0 -29
- package/hedhog/table/operations_promotion_readiness.yaml +0 -49
- package/hedhog/table/operations_promotion_recommendation.yaml +0 -63
- package/hedhog/table/operations_public_recognition.yaml +0 -46
- package/hedhog/table/operations_reward.yaml +0 -100
- package/hedhog/table/operations_score_event.yaml +0 -81
- package/hedhog/table/operations_task.yaml +0 -60
- package/src/operations-data.controller.ts +0 -54
- package/src/operations-growth.controller.ts +0 -44
|
@@ -0,0 +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]
|
|
@@ -0,0 +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,64 +1,67 @@
|
|
|
1
|
-
columns:
|
|
2
|
-
- type: pk
|
|
3
|
-
- name: user_id
|
|
4
|
-
type: int
|
|
5
|
-
- name:
|
|
6
|
-
type: fk
|
|
7
|
-
isNullable: true
|
|
8
|
-
references:
|
|
9
|
-
table:
|
|
10
|
-
column: id
|
|
11
|
-
onDelete: SET NULL
|
|
12
|
-
onUpdate: CASCADE
|
|
13
|
-
- name:
|
|
14
|
-
type:
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
- name:
|
|
28
|
-
type: varchar
|
|
29
|
-
length: 120
|
|
30
|
-
isNullable: true
|
|
31
|
-
- name:
|
|
32
|
-
type: varchar
|
|
33
|
-
length: 120
|
|
34
|
-
isNullable: true
|
|
35
|
-
- name:
|
|
36
|
-
type:
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
- columns: [
|
|
61
|
-
|
|
62
|
-
- columns: [
|
|
63
|
-
|
|
64
|
-
- columns: [
|
|
1
|
+
columns:
|
|
2
|
+
- type: pk
|
|
3
|
+
- name: user_id
|
|
4
|
+
type: int
|
|
5
|
+
- name: supervisor_collaborator_id
|
|
6
|
+
type: fk
|
|
7
|
+
isNullable: true
|
|
8
|
+
references:
|
|
9
|
+
table: operations_collaborator
|
|
10
|
+
column: id
|
|
11
|
+
onDelete: SET NULL
|
|
12
|
+
onUpdate: CASCADE
|
|
13
|
+
- name: code
|
|
14
|
+
type: varchar
|
|
15
|
+
length: 32
|
|
16
|
+
- name: collaborator_type
|
|
17
|
+
type: enum
|
|
18
|
+
values: [clt, pj, freelancer, intern, other]
|
|
19
|
+
default: other
|
|
20
|
+
- name: display_name
|
|
21
|
+
type: varchar
|
|
22
|
+
length: 180
|
|
23
|
+
- name: department
|
|
24
|
+
type: varchar
|
|
25
|
+
length: 120
|
|
26
|
+
isNullable: true
|
|
27
|
+
- name: title
|
|
28
|
+
type: varchar
|
|
29
|
+
length: 120
|
|
30
|
+
isNullable: true
|
|
31
|
+
- name: level_label
|
|
32
|
+
type: varchar
|
|
33
|
+
length: 120
|
|
34
|
+
isNullable: true
|
|
35
|
+
- name: weekly_capacity_hours
|
|
36
|
+
type: decimal
|
|
37
|
+
precision: 6
|
|
38
|
+
scale: 2
|
|
39
|
+
isNullable: true
|
|
40
|
+
- name: status
|
|
41
|
+
type: enum
|
|
42
|
+
values: [active, on_leave, inactive]
|
|
43
|
+
default: active
|
|
44
|
+
- name: joined_at
|
|
45
|
+
type: date
|
|
46
|
+
isNullable: true
|
|
47
|
+
- name: left_at
|
|
48
|
+
type: date
|
|
49
|
+
isNullable: true
|
|
50
|
+
- name: notes
|
|
51
|
+
type: text
|
|
52
|
+
isNullable: true
|
|
53
|
+
- name: deleted_at
|
|
54
|
+
type: datetime
|
|
55
|
+
isNullable: true
|
|
56
|
+
- type: created_at
|
|
57
|
+
- type: updated_at
|
|
58
|
+
|
|
59
|
+
indices:
|
|
60
|
+
- columns: [user_id]
|
|
61
|
+
isUnique: true
|
|
62
|
+
- columns: [code]
|
|
63
|
+
isUnique: true
|
|
64
|
+
- columns: [collaborator_type]
|
|
65
|
+
- columns: [supervisor_collaborator_id]
|
|
66
|
+
- columns: [status]
|
|
67
|
+
- columns: [deleted_at]
|
|
@@ -0,0 +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,44 +1,88 @@
|
|
|
1
|
-
columns:
|
|
2
|
-
- type: pk
|
|
3
|
-
- name: code
|
|
4
|
-
type: varchar
|
|
5
|
-
length: 40
|
|
6
|
-
- name: name
|
|
7
|
-
type: varchar
|
|
8
|
-
length: 180
|
|
9
|
-
- name:
|
|
10
|
-
type:
|
|
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
|
-
- name:
|
|
40
|
-
type:
|
|
41
|
-
isNullable: true
|
|
1
|
+
columns:
|
|
2
|
+
- type: pk
|
|
3
|
+
- name: code
|
|
4
|
+
type: varchar
|
|
5
|
+
length: 40
|
|
6
|
+
- name: name
|
|
7
|
+
type: varchar
|
|
8
|
+
length: 180
|
|
9
|
+
- name: contract_category
|
|
10
|
+
type: enum
|
|
11
|
+
values: [employee, contractor, client, supplier, vendor, partner, internal, other]
|
|
12
|
+
default: client
|
|
13
|
+
- name: contract_type
|
|
14
|
+
type: enum
|
|
15
|
+
values: [clt, pj, freelancer_agreement, service_agreement, fixed_term, recurring_service, nda, amendment, addendum, other]
|
|
16
|
+
default: service_agreement
|
|
17
|
+
- name: client_name
|
|
18
|
+
type: varchar
|
|
19
|
+
length: 180
|
|
20
|
+
- name: signature_status
|
|
21
|
+
type: enum
|
|
22
|
+
values: [not_started, pending, partially_signed, signed, expired]
|
|
23
|
+
default: not_started
|
|
24
|
+
- name: is_active
|
|
25
|
+
type: boolean
|
|
26
|
+
default: true
|
|
27
|
+
- name: billing_model
|
|
28
|
+
type: enum
|
|
29
|
+
values: [time_and_material, monthly_retainer, fixed_price]
|
|
30
|
+
default: time_and_material
|
|
31
|
+
- name: account_manager_collaborator_id
|
|
32
|
+
type: fk
|
|
33
|
+
isNullable: true
|
|
34
|
+
references:
|
|
35
|
+
table: operations_collaborator
|
|
36
|
+
column: id
|
|
37
|
+
onDelete: SET NULL
|
|
38
|
+
onUpdate: CASCADE
|
|
39
|
+
- name: related_collaborator_id
|
|
40
|
+
type: fk
|
|
41
|
+
isNullable: true
|
|
42
|
+
references:
|
|
43
|
+
table: operations_collaborator
|
|
44
|
+
column: id
|
|
45
|
+
onDelete: SET NULL
|
|
46
|
+
onUpdate: CASCADE
|
|
47
|
+
- name: origin_type
|
|
48
|
+
type: enum
|
|
49
|
+
values: [manual, employee_hiring, client_project]
|
|
50
|
+
default: manual
|
|
51
|
+
- name: origin_id
|
|
52
|
+
type: int
|
|
53
|
+
isNullable: true
|
|
54
|
+
- name: start_date
|
|
55
|
+
type: date
|
|
56
|
+
- name: end_date
|
|
57
|
+
type: date
|
|
58
|
+
isNullable: true
|
|
59
|
+
- name: signed_at
|
|
60
|
+
type: date
|
|
61
|
+
isNullable: true
|
|
62
|
+
- name: effective_date
|
|
63
|
+
type: date
|
|
64
|
+
isNullable: true
|
|
65
|
+
- name: budget_amount
|
|
66
|
+
type: decimal
|
|
67
|
+
precision: 12
|
|
68
|
+
scale: 2
|
|
69
|
+
isNullable: true
|
|
70
|
+
- name: monthly_hour_cap
|
|
71
|
+
type: int
|
|
72
|
+
isNullable: true
|
|
73
|
+
- name: status
|
|
74
|
+
type: enum
|
|
75
|
+
values: [draft, under_review, active, renewal, expired, closed, archived]
|
|
76
|
+
default: draft
|
|
77
|
+
- name: description
|
|
78
|
+
type: text
|
|
79
|
+
isNullable: true
|
|
80
|
+
- name: content_html
|
|
81
|
+
type: text
|
|
82
|
+
isNullable: true
|
|
83
|
+
- name: created_by_user_id
|
|
84
|
+
type: int
|
|
85
|
+
isNullable: true
|
|
42
86
|
- name: updated_by_user_id
|
|
43
87
|
type: int
|
|
44
88
|
isNullable: true
|
|
@@ -48,10 +92,18 @@ columns:
|
|
|
48
92
|
- type: created_at
|
|
49
93
|
- type: updated_at
|
|
50
94
|
|
|
51
|
-
indices:
|
|
52
|
-
- columns: [code]
|
|
53
|
-
isUnique: true
|
|
54
|
-
- columns: [
|
|
55
|
-
- columns: [
|
|
56
|
-
- columns: [
|
|
57
|
-
- columns: [
|
|
95
|
+
indices:
|
|
96
|
+
- columns: [code]
|
|
97
|
+
isUnique: true
|
|
98
|
+
- columns: [account_manager_collaborator_id]
|
|
99
|
+
- columns: [related_collaborator_id]
|
|
100
|
+
- columns: [contract_category]
|
|
101
|
+
- columns: [contract_type]
|
|
102
|
+
- columns: [origin_type]
|
|
103
|
+
- columns: [origin_id]
|
|
104
|
+
- columns: [signature_status]
|
|
105
|
+
- columns: [is_active]
|
|
106
|
+
- columns: [status]
|
|
107
|
+
- columns: [start_date]
|
|
108
|
+
- columns: [end_date]
|
|
109
|
+
- columns: [deleted_at]
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
columns:
|
|
2
|
+
- type: pk
|
|
3
|
+
- name: contract_id
|
|
4
|
+
type: fk
|
|
5
|
+
references:
|
|
6
|
+
table: operations_contract
|
|
7
|
+
column: id
|
|
8
|
+
onDelete: CASCADE
|
|
9
|
+
onUpdate: CASCADE
|
|
10
|
+
- name: document_type
|
|
11
|
+
type: enum
|
|
12
|
+
values: [uploaded_pdf, generated_pdf, attachment, other]
|
|
13
|
+
default: attachment
|
|
14
|
+
- name: file_name
|
|
15
|
+
type: varchar
|
|
16
|
+
length: 200
|
|
17
|
+
- name: mime_type
|
|
18
|
+
type: varchar
|
|
19
|
+
length: 120
|
|
20
|
+
- name: file_content_base64
|
|
21
|
+
type: text
|
|
22
|
+
isNullable: true
|
|
23
|
+
- name: is_current
|
|
24
|
+
type: boolean
|
|
25
|
+
default: true
|
|
26
|
+
- name: notes
|
|
27
|
+
type: text
|
|
28
|
+
isNullable: true
|
|
29
|
+
- name: deleted_at
|
|
30
|
+
type: datetime
|
|
31
|
+
isNullable: true
|
|
32
|
+
- type: created_at
|
|
33
|
+
- type: updated_at
|
|
34
|
+
|
|
35
|
+
indices:
|
|
36
|
+
- columns: [contract_id]
|
|
37
|
+
- columns: [document_type]
|
|
38
|
+
- columns: [is_current]
|
|
39
|
+
- columns: [deleted_at]
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
columns:
|
|
2
|
+
- type: pk
|
|
3
|
+
- name: contract_id
|
|
4
|
+
type: fk
|
|
5
|
+
references:
|
|
6
|
+
table: operations_contract
|
|
7
|
+
column: id
|
|
8
|
+
onDelete: CASCADE
|
|
9
|
+
onUpdate: CASCADE
|
|
10
|
+
- name: term_type
|
|
11
|
+
type: enum
|
|
12
|
+
values: [value, payment, revenue, fine, other]
|
|
13
|
+
default: value
|
|
14
|
+
- name: label
|
|
15
|
+
type: varchar
|
|
16
|
+
length: 180
|
|
17
|
+
- name: amount
|
|
18
|
+
type: decimal
|
|
19
|
+
precision: 12
|
|
20
|
+
scale: 2
|
|
21
|
+
- name: recurrence
|
|
22
|
+
type: enum
|
|
23
|
+
values: [one_time, monthly, quarterly, yearly, other]
|
|
24
|
+
default: one_time
|
|
25
|
+
- name: due_day
|
|
26
|
+
type: int
|
|
27
|
+
isNullable: true
|
|
28
|
+
- name: notes
|
|
29
|
+
type: text
|
|
30
|
+
isNullable: true
|
|
31
|
+
- name: deleted_at
|
|
32
|
+
type: datetime
|
|
33
|
+
isNullable: true
|
|
34
|
+
- type: created_at
|
|
35
|
+
- type: updated_at
|
|
36
|
+
|
|
37
|
+
indices:
|
|
38
|
+
- columns: [contract_id]
|
|
39
|
+
- columns: [term_type]
|
|
40
|
+
- columns: [deleted_at]
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
columns:
|
|
2
|
+
- type: pk
|
|
3
|
+
- name: contract_id
|
|
4
|
+
type: fk
|
|
5
|
+
references:
|
|
6
|
+
table: operations_contract
|
|
7
|
+
column: id
|
|
8
|
+
onDelete: CASCADE
|
|
9
|
+
onUpdate: CASCADE
|
|
10
|
+
- name: actor_user_id
|
|
11
|
+
type: int
|
|
12
|
+
isNullable: true
|
|
13
|
+
- name: action
|
|
14
|
+
type: varchar
|
|
15
|
+
length: 80
|
|
16
|
+
- name: note
|
|
17
|
+
type: text
|
|
18
|
+
isNullable: true
|
|
19
|
+
- name: metadata_json
|
|
20
|
+
type: text
|
|
21
|
+
isNullable: true
|
|
22
|
+
- type: created_at
|
|
23
|
+
|
|
24
|
+
indices:
|
|
25
|
+
- columns: [contract_id]
|
|
26
|
+
- columns: [actor_user_id]
|
|
27
|
+
- columns: [action]
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
columns:
|
|
2
|
+
- type: pk
|
|
3
|
+
- name: contract_id
|
|
4
|
+
type: fk
|
|
5
|
+
references:
|
|
6
|
+
table: operations_contract
|
|
7
|
+
column: id
|
|
8
|
+
onDelete: CASCADE
|
|
9
|
+
onUpdate: CASCADE
|
|
10
|
+
- name: party_role
|
|
11
|
+
type: enum
|
|
12
|
+
values: [employee, employer, client, supplier, vendor, partner, witness, internal_owner, other]
|
|
13
|
+
default: other
|
|
14
|
+
- name: party_type
|
|
15
|
+
type: enum
|
|
16
|
+
values: [individual, company, internal_team, other]
|
|
17
|
+
default: company
|
|
18
|
+
- name: display_name
|
|
19
|
+
type: varchar
|
|
20
|
+
length: 180
|
|
21
|
+
- name: document_number
|
|
22
|
+
type: varchar
|
|
23
|
+
length: 80
|
|
24
|
+
isNullable: true
|
|
25
|
+
- name: email
|
|
26
|
+
type: varchar
|
|
27
|
+
length: 180
|
|
28
|
+
isNullable: true
|
|
29
|
+
- name: phone
|
|
30
|
+
type: varchar
|
|
31
|
+
length: 60
|
|
32
|
+
isNullable: true
|
|
33
|
+
- name: is_primary
|
|
34
|
+
type: boolean
|
|
35
|
+
default: false
|
|
36
|
+
- name: deleted_at
|
|
37
|
+
type: datetime
|
|
38
|
+
isNullable: true
|
|
39
|
+
- type: created_at
|
|
40
|
+
- type: updated_at
|
|
41
|
+
|
|
42
|
+
indices:
|
|
43
|
+
- columns: [contract_id]
|
|
44
|
+
- columns: [party_role]
|
|
45
|
+
- columns: [is_primary]
|
|
46
|
+
- columns: [deleted_at]
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
columns:
|
|
2
|
+
- type: pk
|
|
3
|
+
- name: contract_id
|
|
4
|
+
type: fk
|
|
5
|
+
references:
|
|
6
|
+
table: operations_contract
|
|
7
|
+
column: id
|
|
8
|
+
onDelete: CASCADE
|
|
9
|
+
onUpdate: CASCADE
|
|
10
|
+
- name: revision_type
|
|
11
|
+
type: enum
|
|
12
|
+
values: [amendment, renewal, revision, addendum, other]
|
|
13
|
+
default: revision
|
|
14
|
+
- name: title
|
|
15
|
+
type: varchar
|
|
16
|
+
length: 180
|
|
17
|
+
- name: effective_date
|
|
18
|
+
type: date
|
|
19
|
+
isNullable: true
|
|
20
|
+
- name: status
|
|
21
|
+
type: enum
|
|
22
|
+
values: [draft, active, completed, cancelled]
|
|
23
|
+
default: draft
|
|
24
|
+
- name: summary
|
|
25
|
+
type: text
|
|
26
|
+
isNullable: true
|
|
27
|
+
- name: deleted_at
|
|
28
|
+
type: datetime
|
|
29
|
+
isNullable: true
|
|
30
|
+
- type: created_at
|
|
31
|
+
- type: updated_at
|
|
32
|
+
|
|
33
|
+
indices:
|
|
34
|
+
- columns: [contract_id]
|
|
35
|
+
- columns: [revision_type]
|
|
36
|
+
- columns: [status]
|
|
37
|
+
- columns: [effective_date]
|
|
38
|
+
- columns: [deleted_at]
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
columns:
|
|
2
|
+
- type: pk
|
|
3
|
+
- name: contract_id
|
|
4
|
+
type: fk
|
|
5
|
+
references:
|
|
6
|
+
table: operations_contract
|
|
7
|
+
column: id
|
|
8
|
+
onDelete: CASCADE
|
|
9
|
+
onUpdate: CASCADE
|
|
10
|
+
- name: signer_name
|
|
11
|
+
type: varchar
|
|
12
|
+
length: 180
|
|
13
|
+
- name: signer_role
|
|
14
|
+
type: varchar
|
|
15
|
+
length: 120
|
|
16
|
+
isNullable: true
|
|
17
|
+
- name: signer_email
|
|
18
|
+
type: varchar
|
|
19
|
+
length: 180
|
|
20
|
+
isNullable: true
|
|
21
|
+
- name: signer_status
|
|
22
|
+
type: enum
|
|
23
|
+
values: [pending, signed, rejected]
|
|
24
|
+
default: pending
|
|
25
|
+
- name: signed_at
|
|
26
|
+
type: datetime
|
|
27
|
+
isNullable: true
|
|
28
|
+
- name: deleted_at
|
|
29
|
+
type: datetime
|
|
30
|
+
isNullable: true
|
|
31
|
+
- type: created_at
|
|
32
|
+
- type: updated_at
|
|
33
|
+
|
|
34
|
+
indices:
|
|
35
|
+
- columns: [contract_id]
|
|
36
|
+
- columns: [signer_status]
|
|
37
|
+
- columns: [signed_at]
|
|
38
|
+
- columns: [deleted_at]
|