old_contents: module.exports = function (sequelize, DataTypes) {
    const attributes = {
      name: DataTypes.STRING,
      description: DataTypes.TEXT,
    };
  
    var Course = sequelize.define('Course', attributes);
  
    return Course;
  };
  
new_contents: const slug = require('slug');
  
  module.exports = function (sequelize, DataTypes) {
    const attributes = {
      name: DataTypes.STRING,
      slug: DataTypes.STRING,
      description: DataTypes.TEXT,
    };
  
    const Course = sequelize.define('Course', attributes);
  
    const slugNameHook = function (course) {
      course.slug = slug(course.name, { lower: true });
    };
  
    Course.beforeCreate(slugNameHook);
    Course.beforeUpdate(slugNameHook);
  
    return Course;
  };
  
subject: add slug name hook on course model