chore: add shafafiat page
This commit is contained in:
@@ -70,6 +70,8 @@ const CategorySchema = mongoose.Schema({
|
||||
managerCover: { type: String, get: image },
|
||||
managerName: String,
|
||||
managerDescription: String,
|
||||
/** if category was shafafiat this icon is for that */
|
||||
icon: String,
|
||||
});
|
||||
|
||||
CategorySchema.index({ parent: 1, childs: 1 });
|
||||
|
||||
@@ -5,11 +5,22 @@ const ShafafSchema = Schema(
|
||||
{
|
||||
title: { type: String },
|
||||
icon: { type: String },
|
||||
link: { type: String },
|
||||
content: { type: String },
|
||||
attachment: { type: String },
|
||||
},
|
||||
{
|
||||
timestamps: true,
|
||||
}
|
||||
);
|
||||
|
||||
module.exports = model("Shafaf", ShafafSchema);
|
||||
const ShafafCategory = Schema(
|
||||
{},
|
||||
{
|
||||
timestamps: true,
|
||||
}
|
||||
);
|
||||
|
||||
module.exports = {
|
||||
ShafafModel: model("Shafaf", ShafafSchema),
|
||||
ShafafCategoryModel: model("ShafafCategory", ShafafCategory),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user