mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 08:50:15 +01:00
37 lines
620 B
JavaScript
37 lines
620 B
JavaScript
|
|
const mongoose = require('mongoose');
|
||
|
|
|
||
|
|
const bannerSchema = mongoose.Schema(
|
||
|
|
{
|
||
|
|
bannerId: {
|
||
|
|
type: String,
|
||
|
|
required: true,
|
||
|
|
},
|
||
|
|
message: {
|
||
|
|
type: String,
|
||
|
|
required: true,
|
||
|
|
},
|
||
|
|
displayFrom: {
|
||
|
|
type: Date,
|
||
|
|
required: true,
|
||
|
|
default: Date.now,
|
||
|
|
},
|
||
|
|
displayTo: {
|
||
|
|
type: Date,
|
||
|
|
},
|
||
|
|
type: {
|
||
|
|
type: String,
|
||
|
|
enum: ['banner', 'popup'],
|
||
|
|
default: 'banner',
|
||
|
|
},
|
||
|
|
isPublic: {
|
||
|
|
type: Boolean,
|
||
|
|
default: false,
|
||
|
|
},
|
||
|
|
},
|
||
|
|
|
||
|
|
{ timestamps: true },
|
||
|
|
);
|
||
|
|
|
||
|
|
const Banner = mongoose.model('Banner', bannerSchema);
|
||
|
|
module.exports = Banner;
|