feat(database): add categories schema

This commit is contained in:
frab1t 2019-07-04 08:50:15 +02:00
parent e4b734c182
commit ec192030c2
1 changed files with 20 additions and 0 deletions

20
src/models/categories.js Normal file
View File

@ -0,0 +1,20 @@
const mongoose = require('mongoose');
// Define a schema
const { Schema } = mongoose;
const CategorySchema = new Schema({
type: {
type: String,
trim: true,
},
name: {
type: String,
trim: true,
},
value: {
type: String,
},
});
export default mongoose.model('categories', CategorySchema);