Vulcan/packages/nova-events/lib/collection.js

34 lines
590 B
JavaScript
Raw Normal View History

import { SimpleSchema } from 'meteor/aldeed:simple-schema';
2016-06-23 15:16:32 +09:00
const Events = new Mongo.Collection('events');
2015-05-11 12:15:10 +09:00
Events.schema = new SimpleSchema({
2014-12-31 17:44:21 +09:00
createdAt: {
type: Date
},
name: {
type: String
},
description: {
type: String,
optional: true
},
unique: {
type: Boolean,
optional: true
},
important: { // marking an event as important means it should never be erased
type: Boolean,
optional: true
2015-02-03 11:17:34 +09:00
},
properties: {
type: Object,
optional: true,
blackbox: true
2014-12-31 17:44:21 +09:00
}
});
2015-05-11 12:15:10 +09:00
Events.attachSchema(Events.schema);
2014-12-31 17:44:21 +09:00
export default Events;