File size: 471 Bytes
cfb79bb
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
const mongoose = require('mongoose');

const bannerSchema = new mongoose.Schema({
    id: { type: String, required: true, unique: true },
    title: { type: String, required: true },
    image_url: { type: String }, // External URL or empty
    file_id: { type: String },   // Telegram File ID
    color: { type: String },     // Hex color (optional fallback)
    createdAt: { type: Date, default: Date.now }
});

module.exports = mongoose.model('Banner', bannerSchema);