first
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
export interface ISiteSetting {
|
||||
siteLogo: string;
|
||||
footerDescription: string;
|
||||
footerAddress: string;
|
||||
footerEmail: string;
|
||||
footerPhone: string;
|
||||
downloadAppDetails: [
|
||||
{
|
||||
pic: string;
|
||||
url: string;
|
||||
},
|
||||
];
|
||||
socialMediaLinks: [
|
||||
{
|
||||
icon: string;
|
||||
url: string;
|
||||
},
|
||||
];
|
||||
shipmentContent: string;
|
||||
faqContent: string;
|
||||
policyContent: string;
|
||||
returnRulesContent: string;
|
||||
jobsContent: string;
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
import { Schema, model } from "mongoose";
|
||||
|
||||
import { ISiteSetting } from "./Abstractions/ISiteSetting";
|
||||
|
||||
const SiteSettingSchema = new Schema<ISiteSetting>(
|
||||
{
|
||||
siteLogo: { type: String, required: true },
|
||||
footerDescription: { type: String, required: true },
|
||||
footerAddress: { type: String, required: true },
|
||||
footerEmail: { type: String, required: true },
|
||||
footerPhone: { type: String, required: true },
|
||||
downloadAppDetails: [
|
||||
{
|
||||
pic: { type: String, required: true },
|
||||
url: { type: String, required: true },
|
||||
},
|
||||
],
|
||||
socialMediaLinks: [
|
||||
{
|
||||
icon: { type: String, required: true },
|
||||
url: { type: String, required: true },
|
||||
},
|
||||
],
|
||||
shipmentContent: { type: String, required: true },
|
||||
faqContent: { type: String, required: true },
|
||||
policyContent: { type: String, required: true },
|
||||
returnRulesContent: { type: String, required: true },
|
||||
jobsContent: { type: String, required: true },
|
||||
},
|
||||
{
|
||||
timestamps: true,
|
||||
toJSON: { versionKey: false, virtuals: true },
|
||||
id: false,
|
||||
},
|
||||
);
|
||||
const SiteSettingModel = model<ISiteSetting>("SiteSetting", SiteSettingSchema);
|
||||
|
||||
export { SiteSettingModel };
|
||||
Reference in New Issue
Block a user