forked from UKSOURCE/cms.hailearning.edu.vn
fix conflig pull request
This commit is contained in:
@@ -71,6 +71,20 @@ const blogSchema = new mongoose.Schema({
|
||||
commentsCount: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
|
||||
// Quote/Sidebar section
|
||||
quote: {
|
||||
type: String,
|
||||
default: '',
|
||||
trim: true
|
||||
},
|
||||
|
||||
// Content after quote
|
||||
contentAfterQuote: {
|
||||
type: String,
|
||||
default: '',
|
||||
trim: true
|
||||
}
|
||||
}, {
|
||||
timestamps: true
|
||||
|
||||
118
models/service.js
Normal file
118
models/service.js
Normal file
@@ -0,0 +1,118 @@
|
||||
const mongoose = require("mongoose");
|
||||
|
||||
// Define sub-schemas first
|
||||
const authorSchema = new mongoose.Schema(
|
||||
{
|
||||
name: String,
|
||||
type: String,
|
||||
},
|
||||
{ _id: false },
|
||||
);
|
||||
|
||||
const clientReviewSchema = new mongoose.Schema(
|
||||
{
|
||||
id: String,
|
||||
rating: Number,
|
||||
content: String,
|
||||
author: authorSchema,
|
||||
icon: String,
|
||||
},
|
||||
{ _id: false },
|
||||
);
|
||||
|
||||
const featureSchema = new mongoose.Schema(
|
||||
{
|
||||
title: String,
|
||||
description: String,
|
||||
},
|
||||
{ _id: false },
|
||||
);
|
||||
|
||||
const faqSchema = new mongoose.Schema(
|
||||
{
|
||||
id: String,
|
||||
question: String,
|
||||
answer: String,
|
||||
isExpanded: { type: Boolean, default: false },
|
||||
},
|
||||
{ _id: false },
|
||||
);
|
||||
|
||||
const serviceDetailsSchema = new mongoose.Schema(
|
||||
{
|
||||
title: String,
|
||||
description: String,
|
||||
mainImage: String,
|
||||
overviewTitle: String,
|
||||
overviewDescription: String,
|
||||
additionalDescription: String,
|
||||
keyFeaturesTitle: String,
|
||||
keyFeaturesImage: String,
|
||||
features: [featureSchema],
|
||||
faqTitle: String,
|
||||
faqImage: String,
|
||||
faq: [faqSchema],
|
||||
},
|
||||
{ _id: false },
|
||||
);
|
||||
|
||||
// Main service page schema
|
||||
const serviceSchema = new mongoose.Schema(
|
||||
{
|
||||
pageTitle: String,
|
||||
|
||||
// Main services section
|
||||
services: {
|
||||
title: {
|
||||
subTitle: String,
|
||||
mainTitle: String,
|
||||
},
|
||||
items: [
|
||||
{
|
||||
slug: String,
|
||||
name: String,
|
||||
description: String,
|
||||
image: String,
|
||||
layout: String,
|
||||
details: serviceDetailsSchema,
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
// Destination countries section
|
||||
destinations: {
|
||||
backgroundImage: String,
|
||||
title: {
|
||||
subTitle: String,
|
||||
mainTitle: String,
|
||||
},
|
||||
},
|
||||
|
||||
// Visa types section
|
||||
visas: {
|
||||
items: [
|
||||
{
|
||||
id: String,
|
||||
number: String,
|
||||
name: String,
|
||||
description: String,
|
||||
buttonText: String,
|
||||
buttonLink: String,
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
// Client reviews section
|
||||
reviews: {
|
||||
title: {
|
||||
subTitle: String,
|
||||
mainTitle: String,
|
||||
},
|
||||
thumb: String,
|
||||
items: [clientReviewSchema],
|
||||
},
|
||||
},
|
||||
{ timestamps: true },
|
||||
);
|
||||
|
||||
module.exports = mongoose.model("Service", serviceSchema);
|
||||
Reference in New Issue
Block a user