mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-27 17:45:40 -05:00
16 lines
No EOL
448 B
CoffeeScript
16 lines
No EOL
448 B
CoffeeScript
CocoModel = require('./CocoModel')
|
|
|
|
module.exports = class Purchase extends CocoModel
|
|
@className: "Purchase"
|
|
urlRoot: "/db/purchase"
|
|
@schema: require 'schemas/models/purchase.schema'
|
|
|
|
@makeFor: (toPurchase) ->
|
|
purchase = new Purchase({
|
|
recipient: me.id
|
|
purchaser: me.id
|
|
purchased: {
|
|
original: toPurchase.get('original')
|
|
collection: _.string.underscored toPurchase.constructor.className
|
|
}
|
|
}) |