import mongoose from "mongoose";

const fileSchema = new mongoose.Schema({
    filename: { type: String, required: true },
    contentType: { type: String, required: true },
    size: { type: Number, required: true },
    data: { type: Buffer, required: true }, // new buffer type for image files
    uploadedAt: { type: Date, default: Date.now },
});

export default mongoose.model("File", fileSchema);