

const mongoose = require('mongoose');

const CafePostSchema = new mongoose.Schema({
    postMessage: {
        type: String,
        required: true // Ensures this field is mandatory
    },
    image_url: {
        type: String,
        required: false
    },
    status: {
        type: String,
        enum: ['active', 'inactive'], // Restricts the values to "active" or "inactive"
        default: 'active'
    }
},
{ timestamps: true });

// Create the model
const CafePost = mongoose.model('CafePost', CafePostSchema);

module.exports = CafePost;
