module.exports = (sequelize, DataTypes) => {
  const Empresa = sequelize.define('Empresa', {
    id: {
      type: DataTypes.INTEGER,
      primaryKey: true,
      autoIncrement: true
    },
    Name: {
      type: DataTypes.STRING(100),
      allowNull: false
    },
    BusinessName: {
      type: DataTypes.TEXT
    },
    Address: {
      type: DataTypes.TEXT
    },
    Email: {
      type: DataTypes.TEXT,
      validate: {
        isEmail: true
      }
    },
    Phone: {
      type: DataTypes.TEXT
    },
    Phone2: {
      type: DataTypes.TEXT
    },
    Logo: {
      type: DataTypes.TEXT
    }
  });
  
  return Empresa;
};