Sindbad~EG File Manager

Current Path : /home/infinitibizsol/.trash/models.2/
Upload File :
Current File : /home/infinitibizsol/.trash/models.2/VehicleImage.js

module.exports = (sequelize, DataTypes) => {
  const VehicleImages = sequelize.define(
    "tblVehicleImage",
    {
      image_id: {
        type: DataTypes.INTEGER,
        primaryKey: true,
        autoIncrement: true,
      },

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

      vehicle_id: {
        type: DataTypes.INTEGER,
        allowNull: false,
        validate: {
          notNull: {
            args: true,
            msg: "The vehicle_id cannot be null",
          },
        },
      },
    },
    {
      timestamps: true,
    }
  );

  return VehicleImages;
};

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