/* jshint indent: 2 */

module.exports = function(sequelize, DataTypes) {
  return sequelize.define('load', {
    id: {
      type: DataTypes.INTEGER(11),
      allowNull: false,
      primaryKey: true,
      autoIncrement: true
    },
    company_name: {
      type: DataTypes.STRING(255),
      allowNull: true
    },
    usc_code: {
      type: DataTypes.STRING(255),
      allowNull: true
    },
    name: {
      type: DataTypes.STRING(255),
      allowNull: true
    },
    phone_no: {
      type: DataTypes.STRING,
      allowNull: true
    },
    id_no: {
      type: DataTypes.STRING,
      allowNull: true
    },
    bankno: {
      type: DataTypes.STRING,
      allowNull: true
    },
    workload: {
      type: DataTypes.STRING(255),
      allowNull: true
    },
    compre_salary: {
      type: DataTypes.DECIMAL,
      allowNull: true
    },
    affirm_time: {
      type: DataTypes.DECIMAL,
      allowNull: true
    },
    created_at: {
      type: DataTypes.DATE,
      allowNull: true
    },
    updated_at: {
      type: DataTypes.DATE,
      allowNull: true
    },
    deleted_at: {
      type: DataTypes.DATE,
      allowNull: true
    },
    version: {
      type: DataTypes.INTEGER(11),
      allowNull: true,
      defaultValue: '0'
    },
    redundance_1: {
      type: DataTypes.STRING(255),
      allowNull: true
    },
    redundance_2: {
      type: DataTypes.STRING(255),
      allowNull: true
    },
    redundance_3: {
      type: DataTypes.STRING(255),
      allowNull: true
    },
    redundance_4: {
      type: DataTypes.STRING(255),
      allowNull: true
    }
  }, {
    tableName: 'load_info'
  });
};
