|
#Tutorial de como construir o framework do projeto
|
|
#Tutorial de como construir o framework do projeto
|
|
|
|
|
|
##Adapter.js
|
|
##Adapter.js
|
|
|
|
--
|
|
export default class Adapter {
|
|
export default class Adapter {
|
|
constructor() {
|
|
constructor() {
|
|
self.mongoose = require('mongoose')
|
|
self.mongoose = require('mongoose')
|
... | @@ -18,7 +18,7 @@ export default class Adapter { |
... | @@ -18,7 +18,7 @@ export default class Adapter { |
|
}
|
|
}
|
|
|
|
|
|
##Entity.js
|
|
##Entity.js
|
|
|
|
--
|
|
import Joi from 'joi'
|
|
import Joi from 'joi'
|
|
|
|
|
|
export default class Entity {
|
|
export default class Entity {
|
... | @@ -51,7 +51,7 @@ export default class Entity { |
... | @@ -51,7 +51,7 @@ export default class Entity { |
|
}
|
|
}
|
|
|
|
|
|
##Interactor.js
|
|
##Interactor.js
|
|
|
|
--
|
|
export default class Interactor {
|
|
export default class Interactor {
|
|
constructor() {
|
|
constructor() {
|
|
self.Entity = require('./Entity').default
|
|
self.Entity = require('./Entity').default
|
... | @@ -71,7 +71,7 @@ export default class Interactor { |
... | @@ -71,7 +71,7 @@ export default class Interactor { |
|
}
|
|
}
|
|
|
|
|
|
##translator.js
|
|
##translator.js
|
|
|
|
--
|
|
export default class Translator {
|
|
export default class Translator {
|
|
constructor() {
|
|
constructor() {
|
|
self.Interactor = require('./Interactor').default
|
|
self.Interactor = require('./Interactor').default
|
... | | ... | |