Skip to content

Commit 3397434

Browse files
Merge pull request #105 from topcoder-platform/gigs-job-model
Gigs Listing job model
2 parents 11f0b6b + 16e916c commit 3397434

File tree

4 files changed

+31
-26
lines changed

4 files changed

+31
-26
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ workflows:
7272
only:
7373
- dev
7474
- dev-circleci
75-
- feature/shapeup4-cqrs-update2
75+
- gigs-job-model
7676

7777
# Production builds are exectuted only on tagged commits to the
7878
# master branch.

src/bootstrap.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Joi.rateType = () => Joi.string().valid('hourly', 'daily', 'weekly', 'monthly',
88
Joi.jobStatus = () => Joi.string().valid('sourcing', 'in-review', 'assigned', 'closed', 'cancelled')
99
Joi.jobCandidateStatus = () => Joi.string().valid('open', 'placed', 'selected', 'client rejected - screening', 'client rejected - interview', 'rejected - other', 'cancelled', 'interview', 'topcoder-rejected', 'applied', 'rejected-pre-screen', 'skills-test', 'skills-test', 'phone-screen', 'job-closed', 'offered', 'withdrawn', 'withdrawn-prescreen')
1010
Joi.workload = () => Joi.string().valid('full-time', 'fractional')
11+
Joi.jobTag = () => Joi.string().valid('new', 'dollor', 'hot').allow('')
1112
Joi.title = () => Joi.string().max(128)
1213
// Empty string is not allowed by Joi by default and must be enabled with allow('').
1314
// See https://joi.dev/api/?v=17.3.0#string fro details why it's like this.

src/services/JobCandidateProcessorService.js

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -77,30 +77,30 @@ async function processUpdate (message, transactionId) {
7777
processUpdate.schema = Joi.object()
7878
.keys({
7979
message: Joi.object()
80-
.keys({
81-
topic: Joi.string().required(),
82-
originator: Joi.string().required(),
83-
timestamp: Joi.date().required(),
84-
'mime-type': Joi.string().required(),
85-
key: Joi.string().allow(null),
86-
payload: Joi.object()
87-
.keys({
88-
id: Joi.string().uuid().required(),
89-
jobId: Joi.string().uuid().required(),
90-
userId: Joi.string().uuid().required(),
91-
createdAt: Joi.date().required(),
92-
createdBy: Joi.string().uuid().required(),
93-
updatedAt: Joi.date().allow(null),
94-
viewedByCustomer: Joi.boolean().required(),
95-
updatedBy: Joi.string().uuid().allow(null),
96-
status: Joi.jobCandidateStatus().required(),
97-
externalId: Joi.string().allow(null),
98-
resume: Joi.string().uri().allow(null).allow(''),
99-
remark: Joi.stringAllowEmpty().allow(null)
100-
})
101-
.required()
102-
})
103-
.required(),
80+
.keys({
81+
topic: Joi.string().required(),
82+
originator: Joi.string().required(),
83+
timestamp: Joi.date().required(),
84+
'mime-type': Joi.string().required(),
85+
key: Joi.string().allow(null),
86+
payload: Joi.object()
87+
.keys({
88+
id: Joi.string().uuid().required(),
89+
jobId: Joi.string().uuid().required(),
90+
userId: Joi.string().uuid().required(),
91+
createdAt: Joi.date().required(),
92+
createdBy: Joi.string().uuid().required(),
93+
updatedAt: Joi.date().allow(null),
94+
viewedByCustomer: Joi.boolean().required(),
95+
updatedBy: Joi.string().uuid().allow(null),
96+
status: Joi.jobCandidateStatus().required(),
97+
externalId: Joi.string().allow(null),
98+
resume: Joi.string().uri().allow(null).allow(''),
99+
remark: Joi.stringAllowEmpty().allow(null)
100+
})
101+
.required()
102+
})
103+
.required(),
104104
transactionId: Joi.string().required()
105105
})
106106

src/services/JobProcessorService.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,11 @@ processCreate.schema = Joi.object()
8787
currency: Joi.stringAllowEmpty().allow(null),
8888
roleIds: Joi.array()
8989
.items(Joi.string().uuid().required())
90-
.allow(null)
90+
.allow(null),
91+
showInHotList: Joi.boolean().default(false),
92+
featured: Joi.boolean().default(false),
93+
hotListExcerpt: Joi.stringAllowEmpty().default(''),
94+
jobTag: Joi.jobTag().default('')
9195
})
9296
.required()
9397
})

0 commit comments

Comments
 (0)