Vulcan/packages/vulcan-newsletter/lib/modules/collection.js

37 lines
567 B
JavaScript
Raw Normal View History

2017-04-02 21:11:09 +09:00
import SimpleSchema from 'simpl-schema';
const Newsletters = new Mongo.Collection('newsletters');
const schema = {
_id: {
type: String,
},
createdAt: {
type: Date,
optional: true,
},
userId: {
type: String,
optional: true,
},
scheduledAt: {
type: Date,
optional: true,
},
subject: {
type: String,
optional: true,
},
html: {
type: String,
optional: true,
},
provider: {
type: String,
optional: true,
},
}
Newsletters.attachSchema(new SimpleSchema(schema));
export default Newsletters;