codecombat/server/purchases/Purchase.coffee
2015-03-20 16:33:03 -04:00

6 lines
283 B
CoffeeScript

mongoose = require('mongoose')
PurchaseSchema = new mongoose.Schema({status: String}, {strict: false,read:'nearest'})
PurchaseSchema.index({recipient: 1, 'purchased.original': 1}, {unique: true, name: 'unique purchase'})
module.exports = mongoose.model('purchase', PurchaseSchema)