codecombat/server/payments/Payment.coffee
2015-03-21 21:49:32 -04:00

7 lines
335 B
CoffeeScript

mongoose = require('mongoose')
config = require '../../server_config'
PaymentSchema = new mongoose.Schema({}, {strict: false, read:config.mongo.readpref})
PaymentSchema.index({recipient: 1, 'stripe.timestamp': 1, 'ios.transactionID'}, {unique: true, name: 'unique payment'})
module.exports = mongoose.model('payment', PaymentSchema)