Guest User

Untitled

a guest
May 8th, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. module.exports = function(sequelize, Sequelize) {
  2. const User = sequelize.define('user', {
  3. id: {
  4. autoIncrement: true,
  5. primaryKey: true,
  6. type: Sequelize.INTEGER
  7. },
  8. firstname: {
  9. type: Sequelize.STRING,
  10. notEmpty: true
  11. },
  12. lastname: {
  13. type: Sequelize.STRING,
  14. notEmpty: true
  15. },
  16. email: {
  17. type: Sequelize.STRING,
  18. unique: true,
  19. notEmpty: true,
  20. validate: {
  21. isEmail: true
  22. }
  23. },
  24. password: {
  25. type: Sequelize.STRING,
  26. allowNull: false
  27. },
  28. });
  29.  
  30. return User;
  31. }
Add Comment
Please, Sign In to add comment