-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Multi Phrase Module Name Support for Module generation
- Loading branch information
1 parent
961819c
commit b2d719b
Showing
8 changed files
with
70 additions
and
45 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
'use strict'; | ||
const { CalmController } = require( '../../../system/core/CalmController' ); | ||
const { SampleService } = require( './sample.service' ); | ||
const { Sample } = require( './sample.model' ); | ||
const sampleDTO = require( './sample.dto' ); | ||
const { MODULE_SINGULAR_PASCALService } = require( './MODULE_SINGULAR_KEBAB.service' ); | ||
const { MODULE_SINGULAR_PASCAL } = require( './MODULE_SINGULAR_KEBAB.model' ); | ||
const MODULE_SINGULAR_CAMELDTO = require( './MODULE_SINGULAR_KEBAB.dto' ); | ||
const autoBind = require( 'auto-bind' ), | ||
sampleService = new SampleService( | ||
new Sample().getInstance() | ||
MODULE_SINGULAR_CAMELService = new MODULE_SINGULAR_PASCALService( | ||
new MODULE_SINGULAR_PASCAL().getInstance() | ||
); | ||
|
||
class SampleController extends CalmController { | ||
class MODULE_SINGULAR_PASCALController extends CalmController { | ||
|
||
constructor( service ) { | ||
super( service ); | ||
this.dto = { ...this.dto, ...sampleDTO }; | ||
this.dto = { ...this.dto, ...MODULE_SINGULAR_CAMELDTO }; | ||
autoBind( this ); | ||
} | ||
|
||
} | ||
|
||
module.exports = new SampleController( sampleService ); | ||
module.exports = new MODULE_SINGULAR_PASCALController( MODULE_SINGULAR_CAMELService ); |
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 |
---|---|---|
@@ -1,14 +1,16 @@ | ||
'use strict'; | ||
const SampleController = require( './sample.controller' ); | ||
const MODULE_SINGULAR_PASCALController = require( './MODULE_SINGULAR_KEBAB.controller' ); | ||
const AuthController = require( '../auth/auth.controller' ); | ||
const express = require( 'express' ); | ||
const router = express.Router(); | ||
|
||
router.get( '/', AuthController.checkLogin, SampleController.getAll ); | ||
router.get( '/:id', AuthController.checkLogin, SampleController.get ); | ||
router.post( '/', AuthController.checkLogin, SampleController.insert ); | ||
router.put( '/:id', AuthController.checkLogin, SampleController.update ); | ||
router.delete( '/:id', AuthController.checkLogin, SampleController.delete ); | ||
router.use(AuthController.checkLogin); | ||
|
||
router.get( '/', MODULE_SINGULAR_PASCALController.getAll ); | ||
router.get( '/:id', MODULE_SINGULAR_PASCALController.get ); | ||
router.post( '/', MODULE_SINGULAR_PASCALController.insert ); | ||
router.put( '/:id', MODULE_SINGULAR_PASCALController.update ); | ||
router.delete( '/:id', MODULE_SINGULAR_PASCALController.delete ); | ||
|
||
|
||
module.exports = router; |
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 |
---|---|---|
@@ -1,10 +1,10 @@ | ||
'use strict'; | ||
const { CalmService } = require( '../../../system/core/CalmService' ); | ||
|
||
class SampleService extends CalmService { | ||
class MODULE_SINGULAR_PASCALService extends CalmService { | ||
constructor( model ) { | ||
super( model ); | ||
} | ||
} | ||
|
||
module.exports = { SampleService }; | ||
module.exports = { MODULE_SINGULAR_PASCALService }; |
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 |
---|---|---|
@@ -1 +1,7 @@ | ||
'use strict'; | ||
/** | ||
* If custom router url is required, export url as "moduleRoute" | ||
*/ | ||
module.exports = { | ||
|
||
}; |
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