import mongoose from 'mongoose';
import { createSchema } from 'mongoose-model-decorators';

const Types = mongoose.Schema.Types;

export default () => {
  class Authentication {
    static schema = {
      user: { type: Types.ObjectId, ref: 'User' },
      email: { type: String, max: 254, required: true, unique: true },
      hash: { type: String, required: true },
      salt: { type: String, required: true },
      validated: { type: Boolean, default: false }
    };
  }

  return createSchema({ minimize: false })(Authentication);
};

@@ -365,54 +365,8 @@
  %7D,%0A
-      salt: %7B type: String, required: true %7D,%0A
     

remove separate "salt" property from Authentication model