Created
June 14, 2018 20:37
-
-
Save mushinlogit/b139697845f0a2c6e3ead98a5a505bf5 to your computer and use it in GitHub Desktop.
x-unfetter-object-assessment.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
const mongoose = require('mongoose'); | |
const stixCommons = require('./stix-commons'); | |
const xunfetterAssessObject = require('./x-unfetter-assessed-object').xunfetterAssessObject; | |
const StixSchema = { | |
created_by_ref: { | |
type: String, | |
required: [true, 'created_by_ref is required'] | |
}, | |
type: { | |
type: String, | |
enum: ['x-unfetter-object-assessment'], | |
default: 'x-unfetter-object-assessment' | |
}, | |
id: String, | |
name: { | |
type: String, | |
required: [true, 'name is required'] | |
}, | |
description: String, | |
object_ref: { | |
type: String, | |
required: [true, 'object_ref is required'] | |
}, | |
assessed_objects: [xunfetterAssessObject] | |
}; | |
const objectAssessment = mongoose.model('XUnfetterObjectAssessment', stixCommons.makeSchema(StixSchema), 'stix'); | |
module.exports = objectAssessment; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment