Files
cms.uldp.edu.vn/models/aboutUs.js
r2xrzh9q2z-lab d1b931d547 first commit
2026-02-02 11:07:09 +07:00

89 lines
1.6 KiB
JavaScript

const mongoose = require("mongoose");
const aboutUsSchema = new mongoose.Schema(
{
// Hero section
hero: {
title: String,
backgroundImage: String,
},
// Introduction section with nested services
introduction: {
subtitle: String,
title: String,
description: String,
mainImage: String,
services: [
{
title: String,
description: String,
},
],
},
// Statistics with nested items
statistics: {
items: [
{
number: String,
description: String,
},
],
},
// Accommodation section with nested features
accommodation: {
subtitle: String,
title: String,
description: String,
features: [
{
title: String,
description: String,
icon: String,
},
],
},
// Activities section with nested gallery
activities: {
subtitle: String,
title: String,
description: String,
gallery: [
{
image: String,
title: String,
description: String,
},
],
},
// Newsletter
newsletter: {
imagePath: String,
title: String,
description: String,
buttonText: String,
},
// Events with nested items
events: {
title: String,
items: [
{
imageUrl: String,
date: String,
title: String,
description: String,
age: String,
},
],
},
},
{timestamps: true}
);
module.exports = mongoose.model("AboutUs", aboutUsSchema);