Spaces:
Paused
Paused
| 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); | |