const Sequelize = require('sequelize');

module.exports = function () {
  const app = this;
  const sequelize = app.get('sequelize');

  const Signup = sequelize.define('signup', {
    firstName: {
      type: Sequelize.STRING,
    },
    lastName: {
      type: Sequelize.STRING,
    },
    email: {
      type: Sequelize.STRING,
    },
    editHash: {
      type: Sequelize.STRING,
      defaultValue: () => Math.random().toString(36).slice(-16),
    },
  }, {
    freezeTableName: true,
    classMethods: {
      associate() {
        const models = app.get('models');

        this.belongsTo(models.quota, { foreignKey: 'quotaId' });

        this.hasMany(models.answer, {
          onDelete: 'CASCADE',
        });
      },
    },
  });

  return Signup;
};

@@ -449,16 +449,171 @@
 %0A    %7D,%0A
+    // Added manually createdAt field to support milliseconds%0A    createdAt: %7B%0A      type: Sequelize.DATE(3),%0A      defaultValue: () =%3E new Date(),%0A    %7D,%0A
   %7D, %7B%0A 

Support for milliseconds