-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #40 from fabrix-app/v1.6
[feat] parent proto extension
- Loading branch information
Showing
8 changed files
with
108 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
const Model = require('@fabrix/fabrix/dist/common').FabrixModel | ||
const SequelizeResolver = require('../../dist/index').SequelizeResolver | ||
|
||
const TestResolver = class TestResolver extends SequelizeResolver { | ||
|
||
} | ||
|
||
module.exports = TestExtend = class TestExtend extends Model { | ||
static config(app, Sequelize) { | ||
return { | ||
options: {} | ||
} | ||
} | ||
|
||
static schema(app, Sequelize) { | ||
return { | ||
name: {type: Sequelize.STRING, allowNull: false} | ||
} | ||
} | ||
|
||
static get resolver () { | ||
return TestResolver | ||
} | ||
|
||
classLevelMethod() { | ||
return 'foo' | ||
} | ||
} | ||
|
||
TestExtend.prototype.instanceLevelMethod = function() { | ||
return 'bar' | ||
} | ||
TestExtend.prototype.superLevelMethod = function() { | ||
return 'baf' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
const TestExtend = require('./testmodelExtend') | ||
const SequelizeResolver = require('../../dist/index').SequelizeResolver | ||
|
||
const TestResolver = class TestResolver extends SequelizeResolver { | ||
|
||
} | ||
|
||
module.exports = TestExtend2 = class TestExtend2 extends TestExtend { | ||
static config(app, Sequelize) { | ||
return { | ||
options: {} | ||
} | ||
} | ||
|
||
static schema(app, Sequelize) { | ||
return { | ||
name: {type: Sequelize.STRING, allowNull: false} | ||
} | ||
} | ||
|
||
static get resolver () { | ||
return TestResolver | ||
} | ||
|
||
classLevelMethod() { | ||
return 'foo' | ||
} | ||
} | ||
TestExtend2.prototype.instanceLevelMethod = TestExtend.prototype.instanceLevelMethod | ||
TestExtend2.prototype.nextInstanceLevelMethod = function() { | ||
return 'baz' | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters