const mongoose = require('mongoose'); const priceSchema = mongoose.Schema({ currency: {type: String, required: true}, price: {type: Number, required: true}, timestamp: {type: Date, required: true, default: Date.now} }); module.exports = mongoose.model('Price', priceSchema);