import { Prop, Schema, SchemaFactory } from "@nestjs/mongoose"; import { HydratedDocument } from "mongoose"; export type ProfileDocument = HydratedDocument; @Schema({ _id: false }) export class Profile { @Prop() firstName?: string; @Prop() lastName?: string; @Prop() birthDate?: Date; } export const ProfileSchema = SchemaFactory.createForClass(Profile);