codecombat/app/schemas/models/user_remark.coffee

42 lines
1.4 KiB
CoffeeScript
Raw Normal View History

2014-06-17 16:03:08 -04:00
c = require './../schemas'
2015-12-18 13:34:21 -05:00
# Deprecated. TODO: Remove
2014-06-17 16:03:08 -04:00
UserRemarkSchema = c.object {
2014-06-30 22:16:26 -04:00
title: 'Remark'
description: 'Remarks on a user, point of contact, tasks.'
2014-06-17 16:03:08 -04:00
}
_.extend UserRemarkSchema.properties,
2014-06-30 22:16:26 -04:00
user: c.objectId links: [{rel: 'extra', href: '/db/user/{($)}'}]
contact: c.objectId links: [{rel: 'extra', href: '/db/user/{($)}'}]
2014-06-17 16:03:08 -04:00
created: c.date title: 'Created', readOnly: true
history: c.array {title: 'History', description: 'Records of our interactions with the user.'},
c.object {title: 'Record'}, {date: c.date(title: 'Date'), content: {title: 'Content', type: 'string', format: 'markdown'}}
tasks: c.array {title: 'Tasks', description: 'Task entries: when to email the contact about something.'},
2014-07-18 17:50:31 -04:00
c.object {title: 'Task'},
date: c.date
title: 'Date'
action:
title: 'Action'
type: 'string'
status:
title: 'Status'
description: 'The current status of the task'
type: 'string'
enum: ['Not started', 'In progress', 'Completed']
notes:
title: 'Notes'
description: 'Notes about the task in progress'
type: 'string'
format: 'markdown'
2014-06-17 16:03:08 -04:00
# denormalization
2014-06-30 22:16:26 -04:00
userName: {title: 'Player Name', type: 'string'}
contactName: {title: 'Contact Name', type: 'string'} # Not actually our usernames
2014-06-17 16:03:08 -04:00
c.extendBasicProperties UserRemarkSchema, 'user.remark'
module.exports = UserRemarkSchema