Initial commit

This commit is contained in:
2026-09-16 17:36:46 +05:30
commit c9f429d123
117 changed files with 14145 additions and 0 deletions

16
server/models/Category.js Normal file
View File

@@ -0,0 +1,16 @@
const mongoose = require('mongoose');
const categorySchema = new mongoose.Schema({
name: { type: String, required: true, trim: true, unique: true },
slug: { type: String, required: true, unique: true, lowercase: true },
description: { type: String, default: '' },
image: { type: String, default: 'https://images.unsplash.com/photo-1510915361894-db8b60106cb1?w=600' },
homeImage: { type: String, default: '' },
fallbackImage: { type: String, default: 'https://images.unsplash.com/photo-1510915361894-db8b60106cb1?w=600' },
parentCategory: { type: mongoose.Schema.Types.ObjectId, ref: 'Category', default: null },
displayOrder: { type: Number, default: 0 },
isFeaturedHome: { type: Boolean, default: true },
isActive: { type: Boolean, default: true }
}, { timestamps: true });
module.exports = mongoose.model('Category', categorySchema);