module.exports = function (sequelize, DataTypes) {
  const attributes = {
    name: DataTypes.STRING,
    description: DataTypes.TEXT,
  };

  var Course = sequelize.define('Course', attributes);

  return Course;
};

@@ -1,8 +1,39 @@
+const slug = require('slug');%0A%0A
 module.e
@@ -126,16 +126,44 @@
 STRING,%0A
+    slug: DataTypes.STRING,%0A
     desc
@@ -199,11 +199,13 @@
 %0A%0A  
-var
+const
  Cou
@@ -251,16 +251,194 @@
 utes);%0A%0A
+  const slugNameHook = function (course) %7B%0A    course.slug = slug(course.name, %7B lower: true %7D);%0A  %7D;%0A%0A  Course.beforeCreate(slugNameHook);%0A  Course.beforeUpdate(slugNameHook);%0A%0A
   return

add slug name hook on course model