Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module.exports = function(sequelize, Sequelize) {
- const User = sequelize.define('user', {
- id: {
- autoIncrement: true,
- primaryKey: true,
- type: Sequelize.INTEGER
- },
- firstname: {
- type: Sequelize.STRING,
- notEmpty: true
- },
- lastname: {
- type: Sequelize.STRING,
- notEmpty: true
- },
- email: {
- type: Sequelize.STRING,
- unique: true,
- notEmpty: true,
- validate: {
- isEmail: true
- }
- },
- password: {
- type: Sequelize.STRING,
- allowNull: false
- },
- });
- return User;
- }
Add Comment
Please, Sign In to add comment