const mongoose = require('mongoose');

const assetSchema = new mongoose.Schema({
    filePath: {
        type: String,
        required: true
    },
    uploadedBy: {
        type: mongoose.Schema.Types.ObjectId,
        ref: 'User',
        required: true
    },
    coordinates: {
        lat: {
            type: Number
        },
        lng: {
            type: Number
        }
    }
}, {
    timestamps: true
});

module.exports = mongoose.model('Asset', assetSchema);
