24 lines
423 B
JavaScript
24 lines
423 B
JavaScript
module.exports = (sequelize, DataTypes) => {
|
|
const CarsColors = sequelize.define(
|
|
"CarsColors",
|
|
{
|
|
CarId: {
|
|
type: DataTypes.INTEGER,
|
|
references: {
|
|
model: "Cars",
|
|
key: "id"
|
|
}
|
|
},
|
|
ColorId: {
|
|
type: DataTypes.INTEGER,
|
|
references: {
|
|
model: "Colors",
|
|
key: "id"
|
|
}
|
|
}
|
|
},
|
|
{}
|
|
);
|
|
|
|
return CarsColors;
|
|
};
|