feat: standardize admin form limits and guidance

This commit is contained in:
Tống Thành Đạt
2026-04-10 15:55:15 +07:00
parent 7ce5921fe0
commit 51c6303437
34 changed files with 1692 additions and 361 deletions

View File

@@ -15,11 +15,13 @@ const breadcrumbItemSchema = new mongoose.Schema(
type: String,
trim: true,
default: "",
maxlength: 40,
},
link: {
type: String,
trim: true,
default: "",
maxlength: 255,
},
},
{ _id: false }
@@ -32,16 +34,19 @@ const heroSchema = new mongoose.Schema(
type: String,
trim: true,
default: "Pricing Plan",
maxlength: 60,
},
backgroundImage: {
type: String,
trim: true,
default: "/assets/img/inner-page/breadcrumb.jpg",
maxlength: 255,
},
shapeImage: {
type: String,
trim: true,
default: "/assets/img/inner-page/shape.png",
maxlength: 255,
},
breadcrumb: {
type: [breadcrumbItemSchema],
@@ -58,16 +63,19 @@ const pricingSectionSchema = new mongoose.Schema(
type: String,
trim: true,
default: "pricing plan",
maxlength: 64,
},
heading: {
type: String,
trim: true,
default: "Flexible Plans to Suit Every Traveler",
maxlength: 120,
},
description: {
type: String,
trim: true,
default: "",
maxlength: 500,
},
},
{ _id: false }
@@ -80,36 +88,43 @@ const planSchema = new mongoose.Schema(
type: String,
trim: true,
required: true,
maxlength: 64,
},
price: {
type: String,
trim: true,
default: "0",
maxlength: 32,
},
period: {
type: String,
trim: true,
default: "mo",
maxlength: 8,
},
currency: {
type: String,
trim: true,
default: "$",
maxlength: 8,
},
buttonText: {
type: String,
trim: true,
default: "Get Started Today",
maxlength: 64,
},
buttonLink: {
type: String,
trim: true,
default: "/pricing",
maxlength: 255,
},
buttonIcon: {
type: String,
trim: true,
default: "fa-solid fa-arrow-right",
maxlength: 64,
},
style: {
type: String,
@@ -118,7 +133,7 @@ const planSchema = new mongoose.Schema(
default: "default",
},
features: {
type: [String],
type: [{ type: String, maxlength: 96 }],
default: [],
},
},
@@ -147,11 +162,13 @@ const testimonialItemSchema = new mongoose.Schema(
type: String,
trim: true,
default: "",
maxlength: 64,
},
role: {
type: String,
trim: true,
default: "",
maxlength: 64,
},
rating: {
type: Number,
@@ -163,6 +180,7 @@ const testimonialItemSchema = new mongoose.Schema(
type: String,
trim: true,
default: "",
maxlength: 400,
},
},
{ _id: false }
@@ -175,31 +193,37 @@ const testimonialsSchema = new mongoose.Schema(
type: String,
trim: true,
default: "What Our Clients Say",
maxlength: 64,
},
heading: {
type: String,
trim: true,
default: "Immigration Success Stories",
maxlength: 120,
},
buttonText: {
type: String,
trim: true,
default: "View All Review",
maxlength: 64,
},
buttonLink: {
type: String,
trim: true,
default: "/contact",
maxlength: 255,
},
buttonIcon: {
type: String,
trim: true,
default: "fa-solid fa-arrow-right",
maxlength: 64,
},
image: {
type: String,
trim: true,
default: "",
maxlength: 255,
},
items: {
type: [testimonialItemSchema],