feat: Add initial CMS for home page content management, including sections for hero, testimonials, partners, and more.

This commit is contained in:
Wini_Fy
2026-02-05 15:55:27 +07:00
parent b4891101e7
commit de50d554c9
17 changed files with 1681 additions and 2887 deletions

View File

@@ -156,19 +156,40 @@ const AchievementsSchema = new Schema(
{ _id: false },
);
const PartnerItemSchema = new Schema(
const VisaConsultancyItemSchema = new Schema(
{
name: { type: String, default: "" },
logo: { type: String, default: "" },
icon: { type: String, default: "" },
year: { type: String, default: "" },
},
{ _id: false },
);
const VisaConsultancySchema = new Schema(
{
items: { type: [VisaConsultancyItemSchema], default: [] },
},
{ _id: false },
);
const BrandItemSchema = new Schema(
{
logo: { type: String, default: "" },
},
{ _id: false },
);
const BrandsSchema = new Schema(
{
items: { type: [BrandItemSchema], default: [] },
},
{ _id: false },
);
const PartnersSchema = new Schema(
{
heading: { type: String, default: "" },
items: { type: [PartnerItemSchema], default: [] },
visaConsultancy: { type: VisaConsultancySchema, default: () => ({}) },
brands: { type: BrandsSchema, default: () => ({}) },
},
{ _id: false },
);
@@ -196,6 +217,7 @@ const BlogPreviewSchema = new Schema(
subheading: { type: String, default: "" },
ctaButton: { type: LinkSchema, default: () => ({}) },
items: { type: [BlogPreviewItemSchema], default: [] },
selectedBlogIds: [{ type: Schema.Types.ObjectId, ref: 'Blog' }],
},
{ _id: false },
);