Created
January 2, 2017 05:48
-
-
Save abuzarhamza/0d39564278a55e90704bf6cb7cdd0061 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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