forked from UKSOURCE/cms.lams
51 lines
1.0 KiB
JavaScript
51 lines
1.0 KiB
JavaScript
const mongoose = require("mongoose");
|
|
|
|
const headerSchema = new mongoose.Schema(
|
|
{
|
|
// Logo
|
|
logo: {
|
|
light: String,
|
|
dark: String,
|
|
alt: String,
|
|
},
|
|
|
|
// Sign In Button
|
|
signInButton: {
|
|
label: {
|
|
type: String,
|
|
default: "Sign In",
|
|
},
|
|
href: {
|
|
type: String,
|
|
default: "/signin",
|
|
},
|
|
},
|
|
|
|
// CTA Button
|
|
ctaButton: {
|
|
label: String,
|
|
href: String,
|
|
style: {
|
|
type: String,
|
|
enum: ["primary", "secondary", "outline"],
|
|
default: "primary",
|
|
},
|
|
},
|
|
|
|
// Status
|
|
status: {
|
|
type: String,
|
|
enum: ["active", "inactive"],
|
|
default: "active",
|
|
},
|
|
|
|
order: {
|
|
type: Number,
|
|
default: 1,
|
|
},
|
|
},
|
|
{ timestamps: true },
|
|
);
|
|
|
|
module.exports = mongoose.model("Header", headerSchema);
|