base-domain
Version:
simple module to help build Domain-Driven Design
21 lines (14 loc) • 453 B
text/coffeescript
###*
parent class of model, factory and repository.
gives them @getFacade() method.
###
class Base
getFacade : ->
throw new Error """
Facade is not created yet, or you required domain classes not from Facade.
Require domain classes by facade.getModel(), facade.getFactory(), facade.getRepository()
to attach them getFacade() method.
"""
module.exports = Base