@hirelink/database-prisma 1.1.6 → 1.1.11

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hirelink/database-prisma",
3
- "version": "1.1.6",
3
+ "version": "1.1.11",
4
4
  "description": "A Prisma-based database package for Hirelink applications.",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -0,0 +1,12 @@
1
+ /*
2
+ Warnings:
3
+
4
+ - The `status` column on the `CandidateDocument` table would be dropped and recreated. This will lead to data loss if there is data in the column.
5
+
6
+ */
7
+ -- CreateEnum
8
+ CREATE TYPE "CandidateDocumentStatus" AS ENUM ('pending', 'open', 'overdue', 'complete');
9
+
10
+ -- AlterTable
11
+ ALTER TABLE "CandidateDocument" DROP COLUMN "status",
12
+ ADD COLUMN "status" "CandidateDocumentStatus" NOT NULL DEFAULT 'pending';
@@ -16,8 +16,11 @@ model User {
16
16
  status UserStatus @default(active)
17
17
  created_at DateTime? @default(now())
18
18
  updated_at DateTime? @updatedAt
19
- work_experience Work_experience? @default(experience)
19
+ work_experience Work_experience? @default(experience)
20
+ dob DateTime?
21
+ gender Gender?
20
22
  candidate_documents CandidateDocument[]
23
+ Experience_history ExperienceHistory[]
21
24
  hirelink_ids HirelinkId[]
22
25
  hr_users HrUser[]
23
26
  logs Log[]
@@ -27,7 +30,6 @@ model User {
27
30
  password_reset_requests PasswordResetRequest[]
28
31
  sessions Session[]
29
32
  verification_requests VerificationRequest[]
30
- Experience_history ExperienceHistory[]
31
33
  }
32
34
 
33
35
  model ExperienceHistory {
@@ -36,10 +38,10 @@ model ExperienceHistory {
36
38
  employer String
37
39
  start_date DateTime
38
40
  end_date DateTime
39
- user User @relation(fields: [userId], references: [id])
40
41
  userId String
41
42
  created_at DateTime @default(now())
42
43
  updated_at DateTime @updatedAt
44
+ user User @relation(fields: [userId], references: [id])
43
45
  }
44
46
 
45
47
  model Organization {
@@ -112,16 +114,16 @@ model PolicyMaster {
112
114
  }
113
115
 
114
116
  model CandidateDocument {
115
- doc_id String @id
117
+ doc_id String @id
116
118
  doc_name String
117
119
  doc_type String
118
- status String
119
120
  uploaded_at String
120
121
  user_id String
122
+ created_at DateTime? @default(now())
123
+ updated_at DateTime? @updatedAt
121
124
  candidate_document_type CandidateDocumentType?
122
- created_at DateTime? @default(now())
123
- updated_at DateTime? @updatedAt
124
- user User @relation(fields: [user_id], references: [id])
125
+ status CandidateDocumentStatus @default(pending)
126
+ user User @relation(fields: [user_id], references: [id])
125
127
  }
126
128
 
127
129
  model Session {
@@ -246,3 +248,17 @@ enum NotificationStatus {
246
248
  Unread
247
249
  Read
248
250
  }
251
+
252
+ enum CandidateDocumentStatus {
253
+ pending
254
+ open
255
+ overdue
256
+ complete
257
+ }
258
+
259
+ enum Gender {
260
+ Male
261
+ Female
262
+ Other
263
+ PreferNotToSay
264
+ }
@@ -1,97 +0,0 @@
1
- name: Notify Slack on Pull Request
2
-
3
- on:
4
- pull_request:
5
- types: [opened, reopened, ready_for_review, synchronize]
6
- # pull_request_target:
7
- # types: [opened, reopened, ready_for_review, synchronize]
8
-
9
- jobs:
10
- notify-slack:
11
- runs-on: ubuntu-latest
12
-
13
- steps:
14
- - name: Checkout code
15
- uses: actions/checkout@v4
16
-
17
- - name: Checkout main branch's team_leads.json
18
- run: |
19
- git fetch origin main
20
- git checkout origin/main -- team_leads.json
21
-
22
- - name: Extract PR Info
23
- id: pr
24
- run: |
25
- echo "url=${{ github.event.pull_request.html_url }}" >> $GITHUB_OUTPUT
26
- echo "author=${{ github.event.pull_request.user.login }}" >> $GITHUB_OUTPUT
27
- echo "title=${{ github.event.pull_request.title }}" >> $GITHUB_OUTPUT
28
- echo "head=${{ github.event.pull_request.head.ref }}" >> $GITHUB_OUTPUT
29
- echo "base=${{ github.event.pull_request.base.ref }}" >> $GITHUB_OUTPUT
30
- echo "ref=${{ github.ref }}" >> $GITHUB_OUTPUT
31
- echo "event=${{ github.event_name }}" >> $GITHUB_OUTPUT
32
- echo "commit=${{ github.sha }}" >> $GITHUB_OUTPUT
33
- echo "short_commit=$(echo '${{ github.sha }}' | cut -c1-7)" >> $GITHUB_OUTPUT
34
- echo "workflow_url=https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" >> $GITHUB_OUTPUT
35
-
36
- - name: Lookup Slack User IDs from team_leads.json
37
- id: lead
38
- env:
39
- SLACK_BOT_PR_REVIEW_TOKEN: ${{ secrets.SLACK_BOT_PR_REVIEW_TOKEN }}
40
- run: |
41
- TEAM_LEAD_KEYS=("Team Lead 1" "Team Lead 2")
42
- MENTIONS=""
43
- if [ ! -f team_leads.json ]; then
44
- echo "team_leads.json not found!"
45
- exit 1
46
- fi
47
- for key in "${TEAM_LEAD_KEYS[@]}"; do
48
- EMAIL=$(jq -r --arg k "$key" '.[$k]' team_leads.json)
49
- if [ "$EMAIL" == "null" ] || [ -z "$EMAIL" ]; then
50
- continue
51
- fi
52
- RESPONSE=$(curl -s -H "Authorization: Bearer $SLACK_BOT_PR_REVIEW_TOKEN" \
53
- "https://slack.com/api/users.lookupByEmail?email=$EMAIL")
54
- SLACK_ID=$(echo "$RESPONSE" | jq -r '.user.id // empty')
55
- if [ -n "$SLACK_ID" ]; then
56
- MENTIONS="$MENTIONS <@$SLACK_ID>"
57
- fi
58
- done
59
- echo "lead_mentions=$MENTIONS" >> $GITHUB_OUTPUT
60
-
61
- - name: Send Slack Notification via curl
62
- env:
63
- SLACK_BOT_PR_REVIEW_TOKEN: ${{ secrets.SLACK_BOT_PR_REVIEW_TOKEN }}
64
- run: |
65
- curl -X POST https://slack.com/api/chat.postMessage \
66
- -H "Authorization: Bearer $SLACK_BOT_PR_REVIEW_TOKEN" \
67
- -H "Content-type: application/json" \
68
- --data '{
69
- "channel": "github-pr-review-notification",
70
- "text": "🚨 New Pull Request Notification",
71
- "blocks": [
72
- {
73
- "type": "section",
74
- "fields": [
75
- {
76
- "type": "mrkdwn",
77
- "text": "*Event:*\n`${{ steps.pr.outputs.event }}`"
78
- },
79
- {
80
- "type": "mrkdwn",
81
- "text": "*Ref:*\n`${{ steps.pr.outputs.ref }}`"
82
- },
83
- {
84
- "type": "mrkdwn",
85
- "text": "*Commit:*\n<https://github.com/${{ github.repository }}/commit/${{ steps.pr.outputs.commit }}|`${{ steps.pr.outputs.short_commit }}`>"
86
- }
87
- ]
88
- },
89
- {
90
- "type": "section",
91
- "text": {
92
- "type": "mrkdwn",
93
- "text": ":rotating_light: *New PR* opened by `${{ steps.pr.outputs.author }}`:\n<${{ steps.pr.outputs.url }}|${{ steps.pr.outputs.title }}>\n\n:twisted_rightwards_arrows: *Branch:* `${{ steps.pr.outputs.head }}` → `${{ steps.pr.outputs.base }}`\n:bust_in_silhouette: *Team Lead(s):* \n${{ steps.lead.outputs.lead_mentions }}"
94
- }
95
- }
96
- ]
97
- }'
package/team_leads.json DELETED
@@ -1,3 +0,0 @@
1
- {
2
- "Team Lead 1" : "mahesh@turka.tech"
3
- }