Blame view
imports/api/documents/documents.js
480 Bytes
f0c912bf1
|
1 |
import faker from 'faker'; |
cac7cbc73
|
2 3 4 |
import { Mongo } from 'meteor/mongo'; import { SimpleSchema } from 'meteor/aldeed:simple-schema'; import { Factory } from 'meteor/dburles:factory'; |
d1f05315d
|
5 |
|
f0c912bf1
|
6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
export const Documents = new Mongo.Collection('Documents'); Documents.schema = new SimpleSchema({ title: { type: String, label: 'The title of the document.', }, }); Documents.attachSchema(Documents.schema); Factory.define('document', Documents, { title: () => faker.hacker.phrase(), }); |