TSchema

import { TSchema } from '@appt/mongoose';

The special type to transform a component into a Mongoose Schema. All the configurations accepted by mongoose can be passed through it (TSchema(config)).

import { Component } from '@appt/core';
import { TSchema } from '@appt/mongoose';
@Component({
extend: TSchema
})
export class AppShema {
constructor(){
this.name = {
type: String,
trim: true,
default: "",
}
this.email = {
type: String,
trim: true,
default: "",
}
}
}