@hed-hog/operations 0.0.294 → 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.
Files changed (126) hide show
  1. package/dist/operations.controller.d.ts +415 -0
  2. package/dist/operations.controller.d.ts.map +1 -0
  3. package/dist/operations.controller.js +333 -0
  4. package/dist/operations.controller.js.map +1 -0
  5. package/dist/operations.module.d.ts.map +1 -1
  6. package/dist/operations.module.js +4 -3
  7. package/dist/operations.module.js.map +1 -1
  8. package/dist/operations.service.d.ts +589 -153
  9. package/dist/operations.service.d.ts.map +1 -1
  10. package/dist/operations.service.js +2229 -100
  11. package/dist/operations.service.js.map +1 -1
  12. package/hedhog/data/menu.yaml +198 -251
  13. package/hedhog/data/role.yaml +23 -14
  14. package/hedhog/data/route.yaml +317 -143
  15. package/hedhog/frontend/app/_components/collaborator-details-screen.tsx.ejs +310 -0
  16. package/hedhog/frontend/app/_components/collaborator-form-screen.tsx.ejs +631 -0
  17. package/hedhog/frontend/app/_components/contract-details-screen.tsx.ejs +132 -0
  18. package/hedhog/frontend/app/_components/contract-form-screen.tsx.ejs +558 -0
  19. package/hedhog/frontend/app/_components/project-details-screen.tsx.ejs +291 -0
  20. package/hedhog/frontend/app/_components/project-form-screen.tsx.ejs +689 -0
  21. package/hedhog/frontend/app/_lib/api.ts.ejs +32 -0
  22. package/hedhog/frontend/app/_lib/hooks/use-operations-access.ts.ejs +44 -0
  23. package/hedhog/frontend/app/_lib/types.ts.ejs +360 -0
  24. package/hedhog/frontend/app/_lib/utils/format.ts.ejs +129 -25
  25. package/hedhog/frontend/app/_lib/utils/forms.ts.ejs +14 -0
  26. package/hedhog/frontend/app/approvals/page.tsx.ejs +386 -147
  27. package/hedhog/frontend/app/collaborators/[id]/edit/page.tsx.ejs +11 -0
  28. package/hedhog/frontend/app/collaborators/[id]/page.tsx.ejs +11 -0
  29. package/hedhog/frontend/app/collaborators/new/page.tsx.ejs +5 -0
  30. package/hedhog/frontend/app/collaborators/page.tsx.ejs +261 -0
  31. package/hedhog/frontend/app/contracts/[id]/edit/page.tsx.ejs +11 -0
  32. package/hedhog/frontend/app/contracts/[id]/page.tsx.ejs +11 -108
  33. package/hedhog/frontend/app/contracts/new/page.tsx.ejs +17 -0
  34. package/hedhog/frontend/app/contracts/page.tsx.ejs +262 -181
  35. package/hedhog/frontend/app/page.tsx.ejs +319 -177
  36. package/hedhog/frontend/app/projects/[id]/edit/page.tsx.ejs +11 -0
  37. package/hedhog/frontend/app/projects/[id]/page.tsx.ejs +11 -936
  38. package/hedhog/frontend/app/projects/new/page.tsx.ejs +5 -0
  39. package/hedhog/frontend/app/projects/page.tsx.ejs +236 -1074
  40. package/hedhog/frontend/app/schedule-adjustments/page.tsx.ejs +418 -0
  41. package/hedhog/frontend/app/team/page.tsx.ejs +339 -0
  42. package/hedhog/frontend/app/time-off/page.tsx.ejs +328 -0
  43. package/hedhog/frontend/app/timesheets/page.tsx.ejs +636 -126
  44. package/hedhog/frontend/messages/en.json +648 -454
  45. package/hedhog/frontend/messages/pt.json +647 -454
  46. package/hedhog/table/operations_approval.yaml +49 -0
  47. package/hedhog/table/operations_approval_history.yaml +29 -0
  48. package/hedhog/table/{operations_employee.yaml → operations_collaborator.yaml} +67 -64
  49. package/hedhog/table/operations_collaborator_schedule_day.yaml +34 -0
  50. package/hedhog/table/operations_contract.yaml +100 -48
  51. package/hedhog/table/operations_contract_document.yaml +39 -0
  52. package/hedhog/table/operations_contract_financial_term.yaml +40 -0
  53. package/hedhog/table/operations_contract_history.yaml +27 -0
  54. package/hedhog/table/operations_contract_party.yaml +46 -0
  55. package/hedhog/table/operations_contract_revision.yaml +38 -0
  56. package/hedhog/table/operations_contract_signature.yaml +38 -0
  57. package/hedhog/table/operations_project.yaml +54 -50
  58. package/hedhog/table/{operations_allocation.yaml → operations_project_assignment.yaml} +55 -52
  59. package/hedhog/table/operations_schedule_adjustment_day.yaml +34 -0
  60. package/hedhog/table/operations_schedule_adjustment_request.yaml +53 -0
  61. package/hedhog/table/operations_time_off_request.yaml +57 -0
  62. package/hedhog/table/operations_timesheet.yaml +41 -36
  63. package/hedhog/table/operations_timesheet_entry.yaml +40 -50
  64. package/package.json +7 -6
  65. package/src/operations.controller.ts +182 -0
  66. package/src/operations.module.ts +22 -21
  67. package/src/operations.service.ts +3595 -137
  68. package/hedhog/data/operations_career_level.yaml +0 -102
  69. package/hedhog/data/operations_career_track.yaml +0 -8
  70. package/hedhog/data/operations_certification.yaml +0 -38
  71. package/hedhog/data/operations_evaluation_cycle.yaml +0 -18
  72. package/hedhog/data/operations_performance_criterion.yaml +0 -48
  73. package/hedhog/frontend/app/_components/allocation-calendar.tsx.ejs +0 -56
  74. package/hedhog/frontend/app/_components/kanban-board.tsx.ejs +0 -626
  75. package/hedhog/frontend/app/_components/timesheet-entry-dialog.tsx.ejs +0 -142
  76. package/hedhog/frontend/app/_lib/hooks/use-operations-data.ts.ejs +0 -41
  77. package/hedhog/frontend/app/_lib/hooks/use-operations-growth-data.ts.ejs +0 -63
  78. package/hedhog/frontend/app/_lib/mocks/allocations.mock.ts.ejs +0 -74
  79. package/hedhog/frontend/app/_lib/mocks/contracts.mock.ts.ejs +0 -74
  80. package/hedhog/frontend/app/_lib/mocks/operations-growth.mock.ts.ejs +0 -824
  81. package/hedhog/frontend/app/_lib/mocks/projects.mock.ts.ejs +0 -455
  82. package/hedhog/frontend/app/_lib/mocks/tasks.mock.ts.ejs +0 -117
  83. package/hedhog/frontend/app/_lib/mocks/timesheets.mock.ts.ejs +0 -84
  84. package/hedhog/frontend/app/_lib/mocks/users.mock.ts.ejs +0 -67
  85. package/hedhog/frontend/app/_lib/services/contracts.service.ts.ejs +0 -10
  86. package/hedhog/frontend/app/_lib/services/operations-growth.service.ts.ejs +0 -31
  87. package/hedhog/frontend/app/_lib/services/projects.service.ts.ejs +0 -10
  88. package/hedhog/frontend/app/_lib/services/tasks.service.ts.ejs +0 -10
  89. package/hedhog/frontend/app/_lib/services/timesheets.service.ts.ejs +0 -10
  90. package/hedhog/frontend/app/_lib/types/operations-growth.ts.ejs +0 -209
  91. package/hedhog/frontend/app/_lib/types/operations.ts.ejs +0 -156
  92. package/hedhog/frontend/app/_lib/utils/growth.ts.ejs +0 -62
  93. package/hedhog/frontend/app/_lib/utils/metrics.ts.ejs +0 -103
  94. package/hedhog/frontend/app/_lib/utils/status.ts.ejs +0 -80
  95. package/hedhog/frontend/app/allocations/page.tsx.ejs +0 -155
  96. package/hedhog/frontend/app/career/page.tsx.ejs +0 -143
  97. package/hedhog/frontend/app/certifications/page.tsx.ejs +0 -202
  98. package/hedhog/frontend/app/evaluations/page.tsx.ejs +0 -278
  99. package/hedhog/frontend/app/goals/page.tsx.ejs +0 -171
  100. package/hedhog/frontend/app/growth/page.tsx.ejs +0 -288
  101. package/hedhog/frontend/app/manager/page.tsx.ejs +0 -175
  102. package/hedhog/frontend/app/rewards/page.tsx.ejs +0 -196
  103. package/hedhog/frontend/app/tasks/page.tsx.ejs +0 -999
  104. package/hedhog/table/operations_calibration_item.yaml +0 -61
  105. package/hedhog/table/operations_calibration_session.yaml +0 -25
  106. package/hedhog/table/operations_career_level.yaml +0 -75
  107. package/hedhog/table/operations_career_track.yaml +0 -21
  108. package/hedhog/table/operations_certification.yaml +0 -48
  109. package/hedhog/table/operations_employee_certification.yaml +0 -43
  110. package/hedhog/table/operations_employee_connect.yaml +0 -61
  111. package/hedhog/table/operations_employee_evaluation.yaml +0 -113
  112. package/hedhog/table/operations_employee_evaluation_item.yaml +0 -39
  113. package/hedhog/table/operations_employee_profile.yaml +0 -80
  114. package/hedhog/table/operations_employee_skill_matrix.yaml +0 -30
  115. package/hedhog/table/operations_evaluation_cycle.yaml +0 -31
  116. package/hedhog/table/operations_goal.yaml +0 -67
  117. package/hedhog/table/operations_goal_progress.yaml +0 -31
  118. package/hedhog/table/operations_performance_criterion.yaml +0 -29
  119. package/hedhog/table/operations_promotion_readiness.yaml +0 -49
  120. package/hedhog/table/operations_promotion_recommendation.yaml +0 -63
  121. package/hedhog/table/operations_public_recognition.yaml +0 -46
  122. package/hedhog/table/operations_reward.yaml +0 -100
  123. package/hedhog/table/operations_score_event.yaml +0 -81
  124. package/hedhog/table/operations_task.yaml +0 -60
  125. package/src/operations-data.controller.ts +0 -54
  126. 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: contract_id
6
- type: fk
7
- isNullable: true
8
- references:
9
- table: operations_contract
10
- column: id
11
- onDelete: SET NULL
12
- onUpdate: CASCADE
13
- - name: manager_employee_id
14
- type: fk
15
- isNullable: true
16
- references:
17
- table: operations_employee
18
- column: id
19
- onDelete: SET NULL
20
- onUpdate: CASCADE
21
- - name: employee_code
22
- type: varchar
23
- length: 32
24
- - name: display_name
25
- type: varchar
26
- length: 180
27
- - name: department
28
- type: varchar
29
- length: 120
30
- isNullable: true
31
- - name: current_role_title
32
- type: varchar
33
- length: 120
34
- isNullable: true
35
- - name: current_level_label
36
- type: varchar
37
- length: 120
38
- isNullable: true
39
- - name: hire_date
40
- type: date
41
- isNullable: true
42
- - name: status
43
- type: enum
44
- values: [active, on_leave, inactive]
45
- default: active
46
- - name: notes
47
- type: text
48
- isNullable: true
49
- - name: deleted_at
50
- type: datetime
51
- isNullable: true
52
- - type: created_at
53
- - type: updated_at
54
-
55
- indices:
56
- - columns: [user_id]
57
- isUnique: true
58
- - columns: [employee_code]
59
- isUnique: true
60
- - columns: [contract_id]
61
- - columns: [manager_employee_id]
62
- - columns: [department]
63
- - columns: [status]
64
- - columns: [deleted_at]
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: client_name
10
- type: varchar
11
- length: 180
12
- - name: contract_type
13
- type: enum
14
- values: [tm, monthly, fixed]
15
- default: tm
16
- - name: start_date
17
- type: date
18
- - name: end_date
19
- type: date
20
- isNullable: true
21
- - name: hourly_rate
22
- type: decimal
23
- precision: 12
24
- scale: 2
25
- isNullable: true
26
- - name: hour_limit
27
- type: int
28
- isNullable: true
29
- - name: status
30
- type: enum
31
- values: [draft, active, expired, renewal]
32
- default: draft
33
- - name: billing_rules
34
- type: text
35
- isNullable: true
36
- - name: sla_summary
37
- type: text
38
- isNullable: true
39
- - name: created_by_user_id
40
- type: int
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: [status]
55
- - columns: [start_date]
56
- - columns: [end_date]
57
- - columns: [deleted_at]
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]