Skip to content

Instantly share code, notes, and snippets.

@abuzarhamza
Created January 2, 2017 05:48
Show Gist options
  • Save abuzarhamza/0d39564278a55e90704bf6cb7cdd0061 to your computer and use it in GitHub Desktop.
Save abuzarhamza/0d39564278a55e90704bf6cb7cdd0061 to your computer and use it in GitHub Desktop.
module.exports = function(sequlize, DataType) {
return sequlize.define('todo', {
description: {
type: DataType.STRING,
allowNull: false,
validate: {
len: [1, 250]
}
},
completed: {
type: DataType.BOOLEAN,
allowNull: false,
defaultValue: false
}
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment