forked from UKSOURCE/cms.hailearning.edu.vn
refactor: enhance admin dashboard and layout with blog management links
This commit is contained in:
@@ -91,7 +91,6 @@ const blogSchema = new mongoose.Schema({
|
||||
});
|
||||
|
||||
// Indexes
|
||||
blogSchema.index({ slug: 1 });
|
||||
blogSchema.index({ status: 1, createdAt: -1 });
|
||||
blogSchema.index({ category: 1, status: 1 });
|
||||
blogSchema.index({ isFeatured: 1, status: 1 });
|
||||
|
||||
@@ -30,7 +30,6 @@ const blogCategorySchema = new mongoose.Schema({
|
||||
});
|
||||
|
||||
// Indexes
|
||||
blogCategorySchema.index({ slug: 1 });
|
||||
blogCategorySchema.index({ isActive: 1, name: 1 });
|
||||
|
||||
// Remove __v from JSON output
|
||||
|
||||
@@ -26,7 +26,6 @@ const blogTagSchema = new mongoose.Schema({
|
||||
});
|
||||
|
||||
// Indexes
|
||||
blogTagSchema.index({ slug: 1 });
|
||||
blogTagSchema.index({ isActive: 1, name: 1 });
|
||||
|
||||
// Remove __v from JSON output
|
||||
|
||||
@@ -179,9 +179,10 @@ const DetailedViewSchema = new mongoose.Schema(
|
||||
// Main VisaCountry Schema (Individual country object)
|
||||
const VisaCountrySchema = new mongoose.Schema(
|
||||
{
|
||||
id: { type: Number, required: true, index: true },
|
||||
name: { type: String, required: true, index: true },
|
||||
slug: { type: String, required: true, unique: true, index: true },
|
||||
// Không dùng `index: true` ở đây vì đã tạo index riêng cho hero.summaryList.* bên dưới
|
||||
id: { type: Number, required: true },
|
||||
name: { type: String, required: true },
|
||||
slug: { type: String, required: true, unique: true },
|
||||
icon: { type: String, default: "" },
|
||||
services: {
|
||||
type: [String],
|
||||
|
||||
Reference in New Issue
Block a user