Sindbad~EG File Manager

Current Path : /home/infinitibizsol/.trash/models.4/
Upload File :
Current File : /home/infinitibizsol/.trash/models.4/Auctioneer.js

const { validate } = require("class-validator");

module.exports = (sequelize, DataTypes) => {
  const Auctioneer = sequelize.define(
    "tblAuctioneer",
    {
      auctioneer_id: {
        type: DataTypes.INTEGER,
        primaryKey: true,
        autoIncrement: true,
      },

      firstname: {
        type: DataTypes.STRING,
        allowNull: false,
        validate: {
          notEmpty: {
            args: true,
            msg: "Please provide a firstname",
          },
          notNull: {
            args: true,
            msg: "The firstname cannot be null",
          },
        },
      },

      lastname: {
        type: DataTypes.STRING,
        allowNull: false,
        validate: {
          notEmpty: {
            args: true,
            msg: "Please provide a lastname",
          },
          notNull: {
            args: true,
            msg: "The lastname cannot be null",
          },
        },
      },

      mobile_no: {
        type: DataTypes.STRING,
        allowNull: false,
        validate: {
          notEmpty: {
            args: true,
            msg: "Please provide a mobile_no",
          },
          notNull: {
            args: true,
            msg: "The mobile_no cannot be null",
          },
        },
      },

      business_name: {
        type: DataTypes.STRING,
        allowNull: false,
        validate: {
          notEmpty: {
            args: true,
            msg: "Please provide a business_name",
          },
          notNull: {
            args: true,
            msg: "The business_name cannot be null",
          },
        },
      },

      business_phone: {
        type: DataTypes.STRING,
        allowNull: false,
        validate: {
          notEmpty: {
            args: true,
            msg: "Please provide a business_phone",
          },
          notNull: {
            args: true,
            msg: "The business_phone cannot be null",
          },
        },
      },

      business_email: {
        type: DataTypes.STRING,
        allowNull: false,
        unique: {
          args: true,
          msg: "The email address is already in use!",
        },
        validate: {
          notEmpty: {
            args: true,
            msg: "Please provide a business_email",
          },
          notNull: {
            args: true,
            msg: "The business_email cannot be null",
          },
          isEmail: {
            args: true,
            msg: "Please provide a valid business_email address",
          },
        },
      },

      business_address: {
        type: DataTypes.STRING,
        allowNull: false,
        validate: {
          notEmpty: {
            args: true,
            msg: "Please provide a business_address",
          },
          notNull: {
            args: true,
            msg: "The business_address cannot be null",
          },
        },
      },

      password: {
        type: DataTypes.STRING,
        allowNull: false,
        validate: {
          notEmpty: {
            args: true,
            msg: "Please provide a password",
          },
          notNull: {
            args: true,
            msg: "The password cannot be null",
          },
        },
      },

      resetPasswordToken: {
        type: DataTypes.STRING,
      },

      resetPasswordExpires: {
        type: DataTypes.DATE,
      },
    },

    {
      timestamps: true,
    }
  );

  return Auctioneer;
};

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists