Skip to content

make new models - #431

Open
lightmild wants to merge 3 commits into
danliris:devfrom
lightmild:dev
Open

make new models#431
lightmild wants to merge 3 commits into
danliris:devfrom
lightmild:dev

Conversation

@lightmild

Copy link
Copy Markdown

make new models

make new models
@@ -0,0 +1,17 @@
'use strict';

var BaseModel = require('model-toolkit').BaseModel;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'require' is not defined.


var BaseModel = require('model-toolkit').BaseModel;

module.exports = class WorkingHoursStandard extends BaseModel {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'class' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
'module' is not defined.

@@ -0,0 +1,17 @@
'use strict';

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use the function form of "use strict".

'use strict';
var BaseModel = require('model-toolkit').BaseModel;
var Unit = require('../master/unit');
var Week = require('./weekly-plan-item');

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'require' is not defined.

@@ -0,0 +1,17 @@
'use strict';
var BaseModel = require('model-toolkit').BaseModel;
var Unit = require('../master/unit');

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'require' is not defined.

'use strict';
var BaseModel = require('model-toolkit').BaseModel;

module.exports = class WeeklyPlanItem extends BaseModel {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'class' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
'module' is not defined.

@@ -0,0 +1,21 @@
'use strict';

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use the function form of "use strict".

@@ -0,0 +1,14 @@
'use strict';
var BaseModel = require('model-toolkit').BaseModel;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'require' is not defined.

var BaseModel = require('model-toolkit').BaseModel;


module.exports = class Style extends BaseModel {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'class' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
'module' is not defined.

@@ -0,0 +1,14 @@
'use strict';

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use the function form of "use strict".

update models
'use strict';

var BaseModel = require('model-toolkit').BaseModel;
var BookingItem = require('./booking-order-item');

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'require' is not defined.

@@ -0,0 +1,47 @@
'use strict';

var BaseModel = require('model-toolkit').BaseModel;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'require' is not defined.

this.copy(source);

this.items = (this.items || []).map(item => new BookingItem(item));
this.canceledItems = (this.canceledItems || []).map((item) => {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').


this.copy(source);

this.items = (this.items || []).map(item => new BookingItem(item));

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').

var BaseModel = require('model-toolkit').BaseModel;
var BookingItem = require('./booking-order-item');

module.exports = class BookingOrder extends BaseModel {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'class' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
'module' is not defined.

@@ -0,0 +1,22 @@
'use strict';
var BaseModel = require('model-toolkit').BaseModel;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'require' is not defined.

var Comodity = require('./master-plan-comodity');


module.exports = class BookingOrderItem extends BaseModel {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'class' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
'module' is not defined.

@@ -0,0 +1,22 @@
'use strict';

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use the function form of "use strict".

if(data.canceledItems){
data.canceledItems.should.instanceOf(Array);

for (var canceledItem of data.canceledItems) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'for of' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).

if(data.items){
data.items.should.instanceOf(Array);

for (var item of data.items) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'for of' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).

update models
@@ -0,0 +1,13 @@
'use strict';
var BaseModel = require('model-toolkit').BaseModel;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'require' is not defined.

var BaseModel = require('model-toolkit').BaseModel;


module.exports = class Comodity extends BaseModel {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'class' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
'module' is not defined.

@@ -0,0 +1,13 @@
'use strict';

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use the function form of "use strict".

@coveralls

coveralls commented Jun 9, 2018

Copy link
Copy Markdown

Coverage Status

Coverage decreased (-1.3%) to 69.916% when pulling 6a81472 on lightmild:dev into 1cefd57 on danliris:dev.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants