Update article model

This commit is contained in:
Alexei Nikitin 2014-04-07 19:15:49 +04:00
parent 4ae8927d09
commit 6175a2af22

View file

@ -1,13 +1 @@
c = require '../commons/schemas'
ArticleSchema = c.object()
c.extendNamedProperties ArticleSchema # name first
ArticleSchema.properties.body = { type: 'string', title: 'Content', format: 'markdown' }
ArticleSchema.properties.i18n = { type: 'object', title: 'i18n', format: 'i18n', props: ['body'] }
c.extendBasicProperties(ArticleSchema, 'article')
c.extendSearchableProperties(ArticleSchema)
c.extendVersionedProperties(ArticleSchema, 'article')
module.exports = ArticleSchema
c = require '../commons/schemas' ArticleSchema = c.object() c.extendNamedProperties ArticleSchema # name first ArticleSchema.properties.body = { type: 'string', title: 'Content', format: 'markdown' } ArticleSchema.properties.i18n = { type: 'object', title: 'i18n', format: 'i18n', props: ['name', 'body'] } c.extendBasicProperties(ArticleSchema, 'article') c.extendSearchableProperties(ArticleSchema) c.extendVersionedProperties(ArticleSchema, 'article') module.exports = ArticleSchema