| Total Complexity | 0 |
| Complexity/F | 0 |
| Lines of Code | 14 |
| Function Count | 0 |
| Duplicated Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | // The Price model |
||
| 3 | var mongoose = require('mongoose') |
||
| 4 | var Schema = mongoose.Schema |
||
| 5 | var ObjectId = Schema.ObjectId |
||
| 6 | |||
| 7 | var priceSchema = new Schema({ |
||
| 8 | id: ObjectId, |
||
| 9 | name: {type: String, unique: true, required: true}, |
||
| 10 | date: {type: Date, default: Date.now}, |
||
| 11 | price: {type: Number, default: 0.00}, |
||
| 12 | info: {type: String, default: null}, |
||
| 13 | summer_offer: {type: Boolean, default: false} |
||
| 14 | }) |
||
| 15 | |||
| 16 | module.exports = mongoose.model('Price', priceSchema) |
||
| 17 |