models/price.js   A
last analyzed

Complexity

Total Complexity 0
Complexity/F 0

Size

Lines of Code 14
Function Count 0

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
cc 0
wmc 0
c 2
b 0
f 0
nc 1
mnd 0
bc 0
fnc 0
dl 0
loc 14
rs 10
bpm 0
cpm 0
noi 0
1
// The Price model
2
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