mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-25 08:38:09 -05:00
15 lines
521 B
CoffeeScript
15 lines
521 B
CoffeeScript
|
c = require './../schemas'
|
||
|
|
||
|
PrepaidSchema = c.object({title: 'Prepaid', required: ['creator', 'redeemer', 'type']}, {
|
||
|
creator: c.objectId(links: [ {rel: 'extra', href: '/db/user/{($)}'} ])
|
||
|
redeemer: c.objectId(links: [ {rel: 'extra', href: '/db/user/{($)}'} ])
|
||
|
code: c.shortString(title: "Unique code to redeem")
|
||
|
type: { type: 'string' }
|
||
|
status: { enum: ['active', 'used'], default: 'active' }
|
||
|
properties: {type: 'object'}
|
||
|
})
|
||
|
|
||
|
c.extendBasicProperties(PrepaidSchema, 'prepaid')
|
||
|
|
||
|
module.exports = PrepaidSchema
|