Spaces:
Paused
Paused
Deploy Bot commited on
Commit ·
2d22694
1
Parent(s): a9e048b
yryh
Browse files- src/models/Category.js +2 -1
src/models/Category.js
CHANGED
|
@@ -3,7 +3,8 @@ const mongoose = require('mongoose');
|
|
| 3 |
const categorySchema = new mongoose.Schema({
|
| 4 |
id: { type: String, required: true, unique: true },
|
| 5 |
name: { type: String, required: true },
|
| 6 |
-
description: String
|
|
|
|
| 7 |
});
|
| 8 |
|
| 9 |
module.exports = mongoose.model('Category', categorySchema);
|
|
|
|
| 3 |
const categorySchema = new mongoose.Schema({
|
| 4 |
id: { type: String, required: true, unique: true },
|
| 5 |
name: { type: String, required: true },
|
| 6 |
+
description: String,
|
| 7 |
+
parent: { type: String, default: null } // Parent Category ID
|
| 8 |
});
|
| 9 |
|
| 10 |
module.exports = mongoose.model('Category', categorySchema);
|