forked from premieroctet/openchakra
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cyberleague: [premieroctet#159] Add fields to statist schema
- Loading branch information
1 parent
9a07861
commit 32a54f9
Showing
2 changed files
with
51 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 47 additions & 1 deletion
48
backend/web/server/plugins/cyberleague/schemas/StatisticSchema.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,57 @@ | ||
const mongoose = require('mongoose') | ||
const {schemaOptions} = require('../../../utils/schemas') | ||
const { ENOUGH_SCORES } = require('../consts') | ||
|
||
|
||
const Schema = mongoose.Schema | ||
|
||
const StatisticSchema = new Schema({ | ||
|
||
enoughScores: { | ||
type: String, | ||
enum: Object.keys(ENOUGH_SCORES) | ||
}, | ||
securityIncidentManagement: { | ||
type: Number | ||
}, | ||
partner: { | ||
type: Number | ||
}, | ||
inventory: { | ||
type: Number | ||
}, | ||
insurance: { | ||
type: Number | ||
}, | ||
cyberRef: { | ||
type: Number | ||
}, | ||
intrusion: { | ||
type: Number | ||
}, | ||
externalized: { | ||
type: Number | ||
}, | ||
webApp: { | ||
type: Number | ||
}, | ||
antivirus: { | ||
type: Number | ||
}, | ||
charter: { | ||
type: Number | ||
}, | ||
financial: { | ||
type: Number | ||
}, | ||
sensibilization: { | ||
type: Number | ||
}, | ||
mfa: { | ||
type: Number | ||
}, | ||
admin: { | ||
type: Number | ||
}, | ||
}, schemaOptions ) | ||
|
||
module.exports = StatisticSchema |