mirror of https://github.com/franjsco/tick3t-api
feat(database): add categories schema
This commit is contained in:
parent
e4b734c182
commit
ec192030c2
|
@ -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);
|
Loading…
Reference in New Issue