@rss/common
Advanced tools
Comparing version 0.0.7 to 0.0.8
@@ -18,2 +18,3 @@ 'use strict'; | ||
this._id = new ObjectId(); | ||
this.name = ''; | ||
this.types = []; | ||
@@ -33,2 +34,3 @@ this.tenantCode = []; | ||
this._id = new ObjectId(opt._id); | ||
this.name = opt.name || ''; | ||
this.types = opt.types || []; | ||
@@ -54,2 +56,3 @@ this.tenantCode = opt.tenantCode || []; | ||
_id: { type: 'object' }, | ||
name: { type: 'string' }, | ||
types: { type: 'array', items: { type: 'string', enum: TEMPLATE_TYPES } }, | ||
@@ -56,0 +59,0 @@ tenantCode: { type: 'array', items: { type: 'string' } }, |
{ | ||
"name": "@rss/common", | ||
"version": "0.0.7", | ||
"version": "0.0.8", | ||
"description": "common constant, classes, & helper", | ||
@@ -28,12 +28,6 @@ "author": "Risk & Safety Solution", | ||
"babel": { | ||
"presets": [ | ||
"env" | ||
], | ||
"ignore": [ | ||
"**/*.spec.js" | ||
], | ||
"plugins": [ | ||
"transform-object-rest-spread" | ||
] | ||
"presets": ["env"], | ||
"ignore": ["**/*.spec.js"], | ||
"plugins": ["transform-object-rest-spread"] | ||
} | ||
} |
@@ -10,2 +10,3 @@ const ObjectId = require('bson').ObjectID; | ||
this._id = new ObjectId(); | ||
this.name = ''; | ||
this.types = []; | ||
@@ -23,2 +24,3 @@ this.tenantCode = []; | ||
this._id = new ObjectId(opt._id); | ||
this.name = opt.name || ''; | ||
this.types = opt.types || []; | ||
@@ -42,2 +44,3 @@ this.tenantCode = opt.tenantCode || []; | ||
_id: { type: 'object' }, | ||
name: { type: 'string' }, | ||
types: { type: 'array', items: { type: 'string', enum: TEMPLATE_TYPES } }, | ||
@@ -44,0 +47,0 @@ tenantCode: { type: 'array', items: { type: 'string' } }, |
607776
201
11276