{"size": 917, "ext": "js", "max_stars_repo_path": "fields.js", "max_stars_repo_name": "maccarello/sequelize-models", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "fields.js", "max_issues_repo_name": "maccarello/sequelize-models", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "fields.js", "max_forks_repo_name": "maccarello/sequelize-models", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 15.2833333333, "max_line_length": 43, "alphanum_fraction": 0.5965103599}
const { DataTypes } = require('sequelize');

exports.id = {
  type: DataTypes.INTEGER,
  autoIncrement: true,
  primaryKey: true
};

exports.createdAt = {
  type: DataTypes.DATE,
  defaultValue: DataTypes.NOW,
  allowNull: false,
  field: 'created_at'
};

exports.updatedAt = {
  type: DataTypes.DATE,
  defaultValue: DataTypes.NOW,
  allowNull: false,
  field: 'updated_at'
};

exports.name = {
  type: DataTypes.STRING(255),
  allowNull: false,
  validate: {
    len: {
      args: [ 0, 255 ]
    },
    notEmpty: true,
    notNull: true
  }
};

exports.email = {
  type: DataTypes.STRING(255),
  allowNull: false,
  unique: true,
  validate: {
    isEmail: true,
    len: {
      args: [ 0, 255 ]
    },
    notEmpty: true,
    notNull: true
  }
};

exports.lang = {
  type: DataTypes.STRING(3),
  allowNull: false,
  validate: {
    len: {
      args: [ 0, 3 ]
    },
    notEmpty: true,
    notNull: true
  }
};
