message: Added the ability to pass the schemaOptions object to getModelForClass(). For example: if you want mongoose to take care about createdAt/updatedAt in your collection/model, you can now do getModelForClass(yourClass, mongoose, {timestamps: true});
diff: @@ -13,14 +13,16 @@ export type ModelType<T> = mongoose.Model<InstanceType<T>> & T;
  export class Typegoose {
  id: string;
  - getModelForClass<T>(t: T, existingMongoose?: mongoose.Mongoose) {
  + getModelForClass<T>(t: T, existingMongoose?: mongoose.Mongoose, schemaOptions?: mongoose.SchemaOptions) {
  const name = (this.constructor as any).name;
  if (!models[name]) {
  const Schema = existingMongoose ?
  existingMongoose.Schema.bind(existingMongoose) :
  mongoose.Schema.bind(mongoose);
  - const sch = new Schema(schema[name]);
  + const sch = schemaOptions ?
  + new Schema(schema[name], schemaOptions) :
  + new Schema(schema[name]);
  const staticMethods = methods.staticMethods[name];
  sch.statics = staticMethods;
  