... | @@ -20,6 +20,7 @@ export default class Adapter { |
... | @@ -20,6 +20,7 @@ export default class Adapter { |
|
```
|
|
```
|
|
##Entity.js
|
|
##Entity.js
|
|
--
|
|
--
|
|
|
|
```javascript
|
|
import Joi from 'joi'
|
|
import Joi from 'joi'
|
|
|
|
|
|
export default class Entity {
|
|
export default class Entity {
|
... | @@ -50,9 +51,10 @@ export default class Entity { |
... | @@ -50,9 +51,10 @@ export default class Entity { |
|
return adapter.save(data)
|
|
return adapter.save(data)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
'''
|
|
##Interactor.js
|
|
##Interactor.js
|
|
--
|
|
--
|
|
|
|
```javascript
|
|
export default class Interactor {
|
|
export default class Interactor {
|
|
constructor() {
|
|
constructor() {
|
|
self.Entity = require('./Entity').default
|
|
self.Entity = require('./Entity').default
|
... | @@ -70,9 +72,10 @@ export default class Interactor { |
... | @@ -70,9 +72,10 @@ export default class Interactor { |
|
})
|
|
})
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
'''
|
|
##translator.js
|
|
##translator.js
|
|
--
|
|
--
|
|
|
|
```javascript
|
|
export default class Translator {
|
|
export default class Translator {
|
|
constructor() {
|
|
constructor() {
|
|
self.Interactor = require('./Interactor').default
|
|
self.Interactor = require('./Interactor').default
|
... | @@ -87,3 +90,4 @@ export default class Translator { |
... | @@ -87,3 +90,4 @@ export default class Translator { |
|
|
|
|
|
get()
|
|
get()
|
|
}
|
|
}
|
|
|
|
``` |
|
|
|
\ No newline at end of file |