Blame view

imports/api/documents/documents.js 370 Bytes
d1f05315d   tmcdeveloper   wip adding API an...
1
  import { Mongo } from 'meteor/mongo';
f0c912bf1   tmcdeveloper   add method tests ...
2
  import faker from 'faker';
d1f05315d   tmcdeveloper   wip adding API an...
3

f0c912bf1   tmcdeveloper   add method tests ...
4
5
6
7
8
9
10
11
12
13
14
15
16
17
  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(),
  });