codecombat/server/purchases/Purchase.coffee

7 lines
333 B
CoffeeScript
Raw Normal View History

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