Skip to content

Instantly share code, notes, and snippets.

@axross
Last active August 29, 2015 14:15
Show Gist options
  • Save axross/55c886dd720b9a0bd47f to your computer and use it in GitHub Desktop.
Save axross/55c886dd720b9a0bd47f to your computer and use it in GitHub Desktop.
Isomorphic_model
var Post = Model.createModel({
id: {
type: Number,
validators: ['isNumber'],
},
body: {
type: String,
validators: ['isString']
},
user: {
type: Model.classes.User,
},
}, {
createdAt: true,
modifiedAt: true,
deletedAt: true,
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment