mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-23 23:58:02 -05:00
9c39bf7656
Will remove deprecated properties after updating production.
17 lines
646 B
CoffeeScript
17 lines
646 B
CoffeeScript
c = require './../schemas'
|
|
|
|
PrepaidSchema = c.object({title: 'Prepaid', required: ['creator', 'type']}, {
|
|
creator: c.objectId(links: [ {rel: 'extra', href: '/db/user/{($)}'} ])
|
|
redeemers: c.array {}, c.objectId(links: [ {rel: 'extra', href: '/db/user/{($)}'} ])
|
|
maxRedeemers: { type: 'integer'}
|
|
code: c.shortString(title: "Unique code to redeem")
|
|
type: { type: 'string' }
|
|
properties: {type: 'object'}
|
|
# Deprecated
|
|
status: { enum: ['active', 'used'], default: 'active' }
|
|
redeemer: c.objectId(links: [ {rel: 'extra', href: '/db/user/{($)}'} ])
|
|
})
|
|
|
|
c.extendBasicProperties(PrepaidSchema, 'prepaid')
|
|
|
|
module.exports = PrepaidSchema
|