codecombat/server/purchases/Purchase.coffee
2014-11-11 17:40:29 -08:00

6 lines
268 B
CoffeeScript

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