Sindbad~EG File Manager
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