Guest User

Untitled

a guest
Jan 24th, 2019
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. 'use strict'
  2.  
  3. module.exports = (sequelize, DataTypes) => {
  4. const User = sequelize.define('User', {
  5. email: {
  6. allowNull: false,
  7. unique: true,
  8. type: DataTypes.STRING,
  9. validate: {
  10. isEmail: true,
  11. },
  12. },
  13. password: {
  14. allowNull: false,
  15. type: DataTypes.STRING,
  16. }
  17. }, {
  18. tableName: 'users',
  19. timestamps: true,
  20. })
  21.  
  22. User.associate = function (models) {
  23. // associations
  24. }
  25.  
  26. // hooks
  27.  
  28. return User
  29. }
Add Comment
Please, Sign In to add comment