13 lines
400 B
JavaScript
13 lines
400 B
JavaScript
module.exports = function(sequelize, DataTypes) {
|
|
var DeviceType = sequelize.define("DeviceType", {
|
|
name: DataTypes.STRING
|
|
});
|
|
|
|
DeviceType.associate = function(models) {
|
|
// Using additional options like CASCADE etc for demonstration
|
|
// Can also simply do Task.belongsTo(models.User);
|
|
DeviceType.belongsTo(models.Device);
|
|
};
|
|
|
|
return DeviceType;
|
|
}; |