@cendo/database-schemas 1.0.2 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cendo/database-schemas",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "keywords": [],
@@ -1,7 +1,7 @@
1
1
  const {Schema} = require('mongoose')
2
2
 
3
3
 
4
- const FileRow = new Schema({
4
+ const ImportRow = new Schema({
5
5
  file: {
6
6
  type: Schema.Types.ObjectId,
7
7
  index: true,
@@ -27,7 +27,8 @@ const FileRow = new Schema({
27
27
  status: {
28
28
  type: String,
29
29
  default: 'pending',
30
- enum: ['pending', 'completed', 'failed', 'cancelled']
30
+ enum: ['pending', 'completed', 'failed', 'cancelled'],
31
+ index: true
31
32
  },
32
33
 
33
34
  updated_at: {
@@ -41,13 +42,13 @@ const FileRow = new Schema({
41
42
  })
42
43
 
43
44
 
44
- FileRow.index({
45
+ ImportRow.index({
45
46
  file: 1,
46
47
  line: 1
47
48
  })
48
49
 
49
- FileRow.index({
50
+ ImportRow.index({
50
51
  created_at: 1
51
52
  }, {expireAfterSeconds: 12 * 30 * 24 * 3600})//12 months
52
53
 
53
- module.exports = FileRow
54
+ module.exports = ImportRow