base-domain
Version:
simple module to help build Domain-Driven Design
42 lines (34 loc) • 889 B
text/coffeescript
###
generated by base-domain generator
###
BaseModel = require('base-domain').BaseModel
###*
base model class of <%= @model %>
@class <%= @Model %>
@extends BaseModel
###
class <%=@Model%> extends BaseModel
###*
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 %>