mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-24 16:17:57 -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
|