forked from Yara724/api
19 lines
381 B
TypeScript
19 lines
381 B
TypeScript
import { Prop, Schema, SchemaFactory } from "@nestjs/mongoose";
|
|
import { HydratedDocument } from "mongoose";
|
|
|
|
export type ProfileDocument = HydratedDocument<Profile>;
|
|
|
|
@Schema({ _id: false })
|
|
export class Profile {
|
|
@Prop()
|
|
firstName?: string;
|
|
|
|
@Prop()
|
|
lastName?: string;
|
|
|
|
@Prop()
|
|
birthDate?: Date;
|
|
}
|
|
|
|
export const ProfileSchema = SchemaFactory.createForClass(Profile);
|