Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

enum in mongoose

var RequirementSchema = new mongooseSchema({
   status: {
        type: String,
        enum : ['NEW','STATUS'],
        default: 'NEW'
    },
})
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #enum #mongoose
ADD COMMENT
Topic
Name
7+9 =