forked from Yara724/api
New module for expert field
This commit is contained in:
27
src/expert-initiated/schemas/field-expert.schema.ts
Normal file
27
src/expert-initiated/schemas/field-expert.schema.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
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);
|
||||
Reference in New Issue
Block a user