code: function(){
           var attributes = {
              model: {
                 type: Sequelize.TEXT,
                 allowNull: false
              },
              documentId: {
                 type: Sequelize.UUID,
                 allowNull: false
              },
              revision: {
                 type: Sequelize.INTEGER,
                 allowNull: false
              },
              document: {
                 type: Sequelize.JSON,
                 allowNull: false
              }
           };
           if(options.UUID){
              attributes.id = {
                 primaryKey: true,
                 type: Sequelize.UUID,
                 defaultValue: Sequelize.UUIDV4
              };
              attributes.documentId.type = Sequelize.UUID;
           }
           // Revision model
           var Revision = sequelize.define(options.revisionModel, attributes);
  
           attributes = {
              path: {
                 type: Sequelize.TEXT,
                 allowNull: false
              },
              document: {
                 type: Sequelize.JSON,
                 allowNull: false
              },
              diff: {
                 type: Sequelize.JSON,
                 allowNull: false
              }
           };
           if(options.UUID){
              attributes.id = {
                 primaryKey: true,
                 type: Sequelize.UUID,
                 defaultValue: Sequelize.UUIDV4
              };
           }
  
           // RevisionChange model
           var RevisionChange = sequelize.define(options.revisionChangeModel, attributes);
           // Set associations
           Revision.hasMany(RevisionChange, {
              foreignKey: "revisionId",
              constraints: true,
              as: "changes"
           });
           // Associate with user if necessary
           if (options.userModel) {
              Revision.belongsTo(sequelize.model(options.userModel), {
                 foreignKey: "userId",
                 constraints: true,
                 as: "user"
              });
           }
           return Revision;
        }
docs: Return defineModels()