price-history/models/price-history.js
2024-01-11 04:28:21 +05:30

22 lines
442 B
JavaScript

const mongoose = require('mongoose');
// scheme to store price history
const Schema = new mongoose.Schema({
date: {
type: Date,
required: true,
unique: true
},
asset: {
type: String,
required: true
},
usd: {
type: Number,
required: true
},
inr: {
type: Number,
required: true
}
});
module.exports = mongoose.model('PriceHistory', Schema);