chore: add shafafiat page

This commit is contained in:
mahyargdz
2024-11-19 17:03:46 +03:30
parent 256924dd3a
commit 5401cb47c9
15 changed files with 716 additions and 445 deletions
+2
View File
@@ -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 });
+13 -2
View File
@@ -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),
};