diff --git a/package.json b/package.json index f857c4e..7bd0c50 100644 --- a/package.json +++ b/package.json @@ -60,4 +60,4 @@ "test/e2e/*.js" ] } -} \ No newline at end of file +} diff --git a/src/scripts/createIndex.js b/src/scripts/createIndex.js index a828c8f..c643a42 100644 --- a/src/scripts/createIndex.js +++ b/src/scripts/createIndex.js @@ -29,6 +29,12 @@ async function createIndex () { roles: { type: 'keyword' }, status: { type: 'keyword' }, isApplicationPageActive: { type: 'boolean' }, + minSalary: { type: 'integer' }, + maxSalary: { type: 'integer' }, + hoursPerWeek: { type: 'integer' }, + jobLocation: { type: 'keyword' }, + jobTimezone: { type: 'keyword' }, + currency: { type: 'keyword' }, roleIds: { type: 'keyword' }, createdAt: { type: 'date' }, createdBy: { type: 'keyword' }, @@ -48,6 +54,7 @@ async function createIndex () { status: { type: 'keyword' }, externalId: { type: 'keyword' }, resume: { type: 'text' }, + remark: { type: 'keyword' }, interviews: { type: 'nested', properties: { diff --git a/src/services/JobCandidateProcessorService.js b/src/services/JobCandidateProcessorService.js index 48d8660..bde7e88 100644 --- a/src/services/JobCandidateProcessorService.js +++ b/src/services/JobCandidateProcessorService.js @@ -101,7 +101,8 @@ processCreate.schema = { updatedBy: Joi.string().uuid().allow(null), status: Joi.jobCandidateStatus().required(), externalId: Joi.string().allow(null), - resume: Joi.string().uri().allow(null) + resume: Joi.string().uri().allow(null), + remark: Joi.string().allow(null) }).required() }).required(), transactionId: Joi.string().required() diff --git a/src/services/JobProcessorService.js b/src/services/JobProcessorService.js index ad4aa5f..47f80d6 100644 --- a/src/services/JobProcessorService.js +++ b/src/services/JobProcessorService.js @@ -85,6 +85,12 @@ processCreate.schema = { updatedBy: Joi.string().uuid().allow(null), status: Joi.jobStatus().required(), isApplicationPageActive: Joi.boolean().required(), + minSalary: Joi.number().integer().required(), + maxSalary: Joi.number().integer().required(), + hoursPerWeek: Joi.number().integer().required(), + jobLocation: Joi.string().required(), + jobTimezone: Joi.string().required(), + currency: Joi.string().required(), roleIds: Joi.array().items(Joi.string().uuid().required()).allow(null) }).required() }).required(), diff --git a/test/messages/taas.job.create.event.json b/test/messages/taas.job.create.event.json index c176048..0813259 100644 --- a/test/messages/taas.job.create.event.json +++ b/test/messages/taas.job.create.event.json @@ -25,6 +25,12 @@ "createdBy": "a55fe1bc-1754-45fa-9adc-cf3d6d7c377a", "status": "sourcing", "isApplicationPageActive": false, + "minSalary": 100, + "maxSalary": 200, + "hoursPerWeek": 20, + "jobLocation": "Any location", + "jobTimezone": "GMT", + "currency": "USD", "roleIds": [ "e7b7e818-40d4-4102-b486-09bdd21400b8" ] diff --git a/test/messages/taas.job.update.event.json b/test/messages/taas.job.update.event.json index 8371274..56a7b0d 100644 --- a/test/messages/taas.job.update.event.json +++ b/test/messages/taas.job.update.event.json @@ -24,6 +24,12 @@ "createdAt": "2020-11-05T19:00:16.268Z", "createdBy": "a55fe1bc-1754-45fa-9adc-cf3d6d7c377a", "isApplicationPageActive": false, + "minSalary": 100, + "maxSalary": 200, + "hoursPerWeek": 20, + "jobLocation": "Any location", + "jobTimezone": "GMT", + "currency": "USD", "roleIds": [ "e7b7e818-40d4-4102-b486-09bdd21400b8" ] diff --git a/test/messages/taas.jobcandidate.create.event.json b/test/messages/taas.jobcandidate.create.event.json index 822dc80..28ba870 100644 --- a/test/messages/taas.jobcandidate.create.event.json +++ b/test/messages/taas.jobcandidate.create.event.json @@ -9,6 +9,7 @@ "id": "0cb99adb-8bcd-4952-9203-9867dd45ef6f", "createdAt": "2020-11-05T19:00:19.052Z", "createdBy": "a55fe1bc-1754-45fa-9adc-cf3d6d7c377a", - "status": "open" + "status": "open", + "remark": "excellent" } } \ No newline at end of file diff --git a/test/messages/taas.jobcandidate.update.event.json b/test/messages/taas.jobcandidate.update.event.json index 1254087..cc6e506 100644 --- a/test/messages/taas.jobcandidate.update.event.json +++ b/test/messages/taas.jobcandidate.update.event.json @@ -8,6 +8,7 @@ "jobId": "ffbc24f7-301e-48d3-bf01-c056916056a2", "userId": "a55fe1bc-1754-45fa-9adc-cf3d6d7c377a", "status": "selected", + "remark": "excellent", "updatedAt": "2020-11-05T19:00:21.625Z", "updatedBy": "a55fe1bc-1754-45fa-9adc-cf3d6d7c377a", "createdAt": "2020-11-05T19:00:16.268Z",