Skip to content

Commit

Permalink
Cyberleague: [premieroctet#174] Add pay enum field to carreer schema
Browse files Browse the repository at this point in the history
  • Loading branch information
Bastien-Wappizy committed Oct 2, 2024
1 parent 36e9bed commit f8bb4a7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
3 changes: 2 additions & 1 deletion backend/web/server/plugins/cyberleague/functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const {
setPostPutData,
idEqual,
} = require('../../utils/database')
const { ROLES, SECTOR, EXPERTISE_CATEGORIES, CONTENT_TYPE, JOBS, COMPANY_SIZE, ROLE_PARTNER, ROLE_ADMIN, ROLE_MEMBER, ESTIMATED_DURATION_UNITS, LOOKING_FOR_MISSION, CONTENT_VISIBILITY, EVENT_VISIBILITY, ANSWERS, QUESTION_CATEGORIES, SCORE_LEVELS, COIN_SOURCES, SCORE_LEVEL_1, SCORE_LEVEL_3, SCORE_LEVEL_2, STATUTS, GROUP_VISIBILITY, USER_LEVELS, CONTRACT_TYPES, WORK_DURATIONS } = require('./consts')
const { ROLES, SECTOR, EXPERTISE_CATEGORIES, CONTENT_TYPE, JOBS, COMPANY_SIZE, ROLE_PARTNER, ROLE_ADMIN, ROLE_MEMBER, ESTIMATED_DURATION_UNITS, LOOKING_FOR_MISSION, CONTENT_VISIBILITY, EVENT_VISIBILITY, ANSWERS, QUESTION_CATEGORIES, SCORE_LEVELS, COIN_SOURCES, SCORE_LEVEL_1, SCORE_LEVEL_3, SCORE_LEVEL_2, STATUTS, GROUP_VISIBILITY, USER_LEVELS, CONTRACT_TYPES, WORK_DURATIONS, PAY } = require('./consts')
const { PURCHASE_STATUS } = require('../../../utils/consts')
const Company = require('../../models/Company')
const { BadRequestError, ForbiddenError } = require('../../utils/errors')
Expand Down Expand Up @@ -313,6 +313,7 @@ declareEnumField( {model: 'purchase', field: 'status', enumValues: PURCHASE_STAT
//Carreer declarations
declareEnumField({model: 'carreer', field: 'contract_type', enumValues: CONTRACT_TYPES})
declareEnumField({model: 'carreer', field: 'work_duration', enumValues: WORK_DURATIONS})
declareEnumField({model: 'carreer', field: 'pay', enumValues: PAY})



Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const mongoose = require('mongoose')
const { schemaOptions } = require('../../../utils/schemas')
const { CONTRACT_TYPES, WORK_DURATIONS } = require('../consts')
const { CONTRACT_TYPES, WORK_DURATIONS, PAY } = require('../consts')

const Schema = mongoose.Schema

Expand Down Expand Up @@ -49,6 +49,11 @@ const CarreerSchema = new Schema(
enum: Object.keys(WORK_DURATIONS),
required: false
},
pay: {
type: String,
enum: Object.keys(PAY),
required: false
},
},
schemaOptions
)
Expand Down

0 comments on commit f8bb4a7

Please sign in to comment.