mirror of
https://github.com/franjsco/tick3t-api
synced 2025-06-05 22:09:20 +02:00
feat(database): add categories schema
This commit is contained in:
20
src/models/categories.js
Normal file
20
src/models/categories.js
Normal 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);
|
Reference in New Issue
Block a user