make new models - #431
Conversation
make new models
| @@ -0,0 +1,17 @@ | |||
| 'use strict'; | |||
|
|
|||
| var BaseModel = require('model-toolkit').BaseModel; | |||
|
|
||
| var BaseModel = require('model-toolkit').BaseModel; | ||
|
|
||
| module.exports = class WorkingHoursStandard extends BaseModel { |
There was a problem hiding this comment.
'class' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
'module' is not defined.
| @@ -0,0 +1,17 @@ | |||
| 'use strict'; | |||
There was a problem hiding this comment.
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'); |
| @@ -0,0 +1,17 @@ | |||
| 'use strict'; | |||
| var BaseModel = require('model-toolkit').BaseModel; | |||
| var Unit = require('../master/unit'); | |||
| 'use strict'; | ||
| var BaseModel = require('model-toolkit').BaseModel; | ||
|
|
||
| module.exports = class WeeklyPlanItem extends BaseModel { |
There was a problem hiding this comment.
'class' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
'module' is not defined.
| @@ -0,0 +1,21 @@ | |||
| 'use strict'; | |||
There was a problem hiding this comment.
Use the function form of "use strict".
| @@ -0,0 +1,14 @@ | |||
| 'use strict'; | |||
| var BaseModel = require('model-toolkit').BaseModel; | |||
| var BaseModel = require('model-toolkit').BaseModel; | ||
|
|
||
|
|
||
| module.exports = class Style extends BaseModel { |
There was a problem hiding this comment.
'class' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
'module' is not defined.
| @@ -0,0 +1,14 @@ | |||
| 'use strict'; | |||
There was a problem hiding this comment.
Use the function form of "use strict".
update models
| 'use strict'; | ||
|
|
||
| var BaseModel = require('model-toolkit').BaseModel; | ||
| var BookingItem = require('./booking-order-item'); |
| @@ -0,0 +1,47 @@ | |||
| 'use strict'; | |||
|
|
|||
| var BaseModel = require('model-toolkit').BaseModel; | |||
| this.copy(source); | ||
|
|
||
| this.items = (this.items || []).map(item => new BookingItem(item)); | ||
| this.canceledItems = (this.canceledItems || []).map((item) => { |
There was a problem hiding this comment.
'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').
|
|
||
| this.copy(source); | ||
|
|
||
| this.items = (this.items || []).map(item => new BookingItem(item)); |
There was a problem hiding this comment.
'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 { |
There was a problem hiding this comment.
'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; | |||
| var Comodity = require('./master-plan-comodity'); | ||
|
|
||
|
|
||
| module.exports = class BookingOrderItem extends BaseModel { |
There was a problem hiding this comment.
'class' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
'module' is not defined.
| @@ -0,0 +1,22 @@ | |||
| 'use strict'; | |||
There was a problem hiding this comment.
Use the function form of "use strict".
| if(data.canceledItems){ | ||
| data.canceledItems.should.instanceOf(Array); | ||
|
|
||
| for (var canceledItem of data.canceledItems) { |
There was a problem hiding this comment.
'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) { |
There was a problem hiding this comment.
'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; | |||
| var BaseModel = require('model-toolkit').BaseModel; | ||
|
|
||
|
|
||
| module.exports = class Comodity extends BaseModel { |
There was a problem hiding this comment.
'class' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
'module' is not defined.
| @@ -0,0 +1,13 @@ | |||
| 'use strict'; | |||
There was a problem hiding this comment.
Use the function form of "use strict".
make new models