forked from UKSOURCE/cms.hailearning.edu.vn
feat: standardize admin form limits and guidance
This commit is contained in:
@@ -3,87 +3,87 @@ const mongoose = require("mongoose");
|
||||
const aboutUsSchema = new mongoose.Schema(
|
||||
{
|
||||
hero: {
|
||||
title: String,
|
||||
breadcrumb: [String],
|
||||
backgroundImage: String,
|
||||
title: { type: String, trim: true, maxlength: 80 },
|
||||
breadcrumb: [{ type: String, trim: true, maxlength: 80 }],
|
||||
backgroundImage: { type: String, trim: true, maxlength: 255 },
|
||||
},
|
||||
intro: {
|
||||
subheading: String,
|
||||
heading: String,
|
||||
description: String,
|
||||
image: String,
|
||||
subheading: { type: String, trim: true, maxlength: 80 },
|
||||
heading: { type: String, trim: true, maxlength: 120 },
|
||||
description: { type: String, trim: true, maxlength: 1000 },
|
||||
image: { type: String, trim: true, maxlength: 255 },
|
||||
},
|
||||
mission: {
|
||||
subheading: String,
|
||||
heading: String,
|
||||
description: String,
|
||||
subheading: { type: String, trim: true, maxlength: 80 },
|
||||
heading: { type: String, trim: true, maxlength: 120 },
|
||||
description: { type: String, trim: true, maxlength: 1000 },
|
||||
images: {
|
||||
main: String,
|
||||
secondary: String,
|
||||
bgShape: String,
|
||||
planeShape: String,
|
||||
topShape: String,
|
||||
globeShape: String,
|
||||
main: { type: String, trim: true, maxlength: 255 },
|
||||
secondary: { type: String, trim: true, maxlength: 255 },
|
||||
bgShape: { type: String, trim: true, maxlength: 255 },
|
||||
planeShape: { type: String, trim: true, maxlength: 255 },
|
||||
topShape: { type: String, trim: true, maxlength: 255 },
|
||||
globeShape: { type: String, trim: true, maxlength: 255 },
|
||||
},
|
||||
items: [
|
||||
new mongoose.Schema(
|
||||
{
|
||||
icon: String,
|
||||
label: String,
|
||||
description: String,
|
||||
icon: { type: String, trim: true, maxlength: 255 },
|
||||
label: { type: String, trim: true, maxlength: 80 },
|
||||
description: { type: String, trim: true, maxlength: 240 },
|
||||
},
|
||||
{ _id: false },
|
||||
),
|
||||
],
|
||||
features: [String],
|
||||
features: [{ type: String, trim: true, maxlength: 80 }],
|
||||
ctaButton: {
|
||||
label: String,
|
||||
href: String,
|
||||
label: { type: String, trim: true, maxlength: 64 },
|
||||
href: { type: String, trim: true, maxlength: 255 },
|
||||
},
|
||||
},
|
||||
features: {
|
||||
backgroundImage: String,
|
||||
subheading: String,
|
||||
heading: String,
|
||||
description: String,
|
||||
image: String,
|
||||
backgroundImage: { type: String, trim: true, maxlength: 255 },
|
||||
subheading: { type: String, trim: true, maxlength: 80 },
|
||||
heading: { type: String, trim: true, maxlength: 120 },
|
||||
description: { type: String, trim: true, maxlength: 1000 },
|
||||
image: { type: String, trim: true, maxlength: 255 },
|
||||
items: [
|
||||
new mongoose.Schema(
|
||||
{
|
||||
icon: String,
|
||||
title: String,
|
||||
description: String,
|
||||
icon: { type: String, trim: true, maxlength: 255 },
|
||||
title: { type: String, trim: true, maxlength: 80 },
|
||||
description: { type: String, trim: true, maxlength: 240 },
|
||||
},
|
||||
{ _id: false },
|
||||
),
|
||||
],
|
||||
ctaButton: {
|
||||
label: String,
|
||||
href: String,
|
||||
label: { type: String, trim: true, maxlength: 64 },
|
||||
href: { type: String, trim: true, maxlength: 255 },
|
||||
},
|
||||
},
|
||||
news: {
|
||||
subheading: String,
|
||||
heading: String,
|
||||
subheading: { type: String, trim: true, maxlength: 80 },
|
||||
heading: { type: String, trim: true, maxlength: 120 },
|
||||
ctaButton: {
|
||||
label: String,
|
||||
href: String,
|
||||
label: { type: String, trim: true, maxlength: 64 },
|
||||
href: { type: String, trim: true, maxlength: 255 },
|
||||
},
|
||||
selectedBlogIds: [{ type: mongoose.Schema.Types.ObjectId, ref: "Blog" }],
|
||||
// Deprecated: items field kept for backward compatibility during migration
|
||||
items: [
|
||||
new mongoose.Schema(
|
||||
{
|
||||
title: String,
|
||||
category: String,
|
||||
date: String,
|
||||
title: { type: String, trim: true, maxlength: 120 },
|
||||
category: { type: String, trim: true, maxlength: 48 },
|
||||
date: { type: String, trim: true, maxlength: 32 },
|
||||
comments: Number,
|
||||
author: {
|
||||
name: String,
|
||||
avatar: String,
|
||||
name: { type: String, trim: true, maxlength: 48 },
|
||||
avatar: { type: String, trim: true, maxlength: 255 },
|
||||
},
|
||||
link: String,
|
||||
thumbnail: String,
|
||||
link: { type: String, trim: true, maxlength: 255 },
|
||||
thumbnail: { type: String, trim: true, maxlength: 255 },
|
||||
},
|
||||
{ _id: false },
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user