base-domain
Version:
simple module to help build Domain-Driven Design
43 lines (34 loc) • 874 B
text/coffeescript
###
generated by base-domain generator
###
Entity = require('base-domain').Entity
###*
entity class of <%= @model %>
@class <%= @Model %>
@extends Entity
###
class <%=@Model%> extends Entity
###*
property types
key: property name
value: type
@property properties
@static
@protected
@type Object
###
@properties:
name : @TYPES.STRING
### examples
age : @TYPES.NUMBER
confirmed : @TYPES.BOOLEAN
confirmedAt : @TYPES.DATE
team : @TYPES.MODEL 'team'
extraTeam : @TYPES.MODEL 'team', 'exTeamId'
hobbies : @TYPES.MODELS 'hobby'
newHobbies : @TYPES.MODELS 'hobby', 'newHobbyIds'
otherInfo : @TYPES.OBJECT
createdAt : @TYPES.CREATED_AT
updatedAt : @TYPES.UPDATED_AT
###
module.exports = <%=@Model %>