/
home
/
infinitibizsol
/
.trash
/
models.2
/
File Upload :
llllll
Current File: /home/infinitibizsol/.trash/models.2/Vehicle.js
module.exports = (sequelize, DataTypes) => { const Vehicle = sequelize.define( "tblVehicle", { vehicle_id: { type: DataTypes.INTEGER, primaryKey: true, autoIncrement: true, }, vin: { type: DataTypes.STRING, }, year: { type: DataTypes.INTEGER, allowNull: false, validate: { notNull: { args: true, msg: "The year cannot be null", }, }, }, make: { type: DataTypes.STRING, allowNull: false, validate: { notEmpty: { args: true, msg: "Please provide a make", }, notNull: { args: true, msg: "The make cannot be null", }, }, }, model: { type: DataTypes.STRING, allowNull: false, validate: { notEmpty: { args: true, msg: "Please provide a model", }, notNull: { args: true, msg: "The model cannot be null", }, }, }, trim: { type: DataTypes.STRING, allowNull: true, }, mileage: { type: DataTypes.INTEGER, allowNull: true, }, color: { type: DataTypes.STRING, allowNull: true, }, color_name: { type: DataTypes.STRING, defaultValue: "Black", }, details: { type: DataTypes.TEXT, allowNull: true, }, user_id: { type: DataTypes.INTEGER, allowNull: false, validate: { notNull: { args: true, msg: "The user_id cannot be null", }, }, }, }, { timestamps: true, } ); return Vehicle; };
Copyright ©2k19 -
Hexid
|
Tex7ure