forked from Yara724/api
28 lines
575 B
TypeScript
28 lines
575 B
TypeScript
import { Prop, Schema, SchemaFactory } from "@nestjs/mongoose";
|
|
import { HydratedDocument, Types } from "mongoose";
|
|
|
|
export type FieldExpertDocument = HydratedDocument<FieldExpert>;
|
|
|
|
@Schema({
|
|
id: true,
|
|
timestamps: true,
|
|
})
|
|
export class FieldExpert {
|
|
@Prop({ unique: true })
|
|
email: string;
|
|
|
|
@Prop({ required: true })
|
|
password: string;
|
|
|
|
@Prop({ required: true })
|
|
firstName: string;
|
|
|
|
@Prop({ required: true })
|
|
lastName: string;
|
|
|
|
@Prop({ required: true })
|
|
cellphone: string;
|
|
}
|
|
|
|
export const FieldExpertSchema = SchemaFactory.createForClass(FieldExpert);
|