20 lines
769 B
TypeScript
20 lines
769 B
TypeScript
import mongoose, { Schema, Document } from 'mongoose';
|
|
|
|
export interface ISystemSettings extends Document {
|
|
settingsId: string;
|
|
appName: string;
|
|
appSubtitle: string;
|
|
appLogoUrl?: string;
|
|
updatedBy?: string;
|
|
}
|
|
|
|
const SystemSettingsSchema: Schema = new Schema({
|
|
settingsId: { type: String, required: true, unique: true, default: 'global' },
|
|
appName: { type: String, required: true, default: 'GPI' },
|
|
appSubtitle: { type: String, required: true, default: 'Gestão de Pintura Industrial' },
|
|
appLogoUrl: { type: String },
|
|
updatedBy: { type: String } // Email of the dev who updated it
|
|
}, { timestamps: true });
|
|
|
|
export default mongoose.models.SystemSettings || mongoose.model<ISystemSettings>('SystemSettings', SystemSettingsSchema);
|