Add local weather caching mechanism
This commit is contained in:
14
models/Cache.js
Normal file
14
models/Cache.js
Normal file
@@ -0,0 +1,14 @@
|
||||
var mongoose = require( "mongoose" );
|
||||
|
||||
var cacheSchema = new mongoose.Schema( {
|
||||
|
||||
// Stores the current GPS location as unique for weather data cache
|
||||
location: { type: String, unique: true },
|
||||
|
||||
// This is the end of day value for the humidity yesterday
|
||||
yesterdayHumidity: Number,
|
||||
currentHumidityTotal: Number,
|
||||
currentHumidityCount: Number
|
||||
} );
|
||||
|
||||
module.exports = mongoose.model( "Cache", cacheSchema );
|
||||
Reference in New Issue
Block a user