diff --git a/src/users/dto/create-user.dto.ts b/src/users/dto/create-user.dto.ts index 34297e1cae9c8ac7634be3311347a8fa316abb12..db7bd07018e865772b44ffae7b5e8dd153529bfa 100644 --- a/src/users/dto/create-user.dto.ts +++ b/src/users/dto/create-user.dto.ts @@ -12,6 +12,18 @@ export class CreateUserDto { @ApiProperty({ type: String }) email: string; + @IsNotEmpty() + @ApiProperty({ type: String }) + name: string; + + @IsNotEmpty() + @ApiProperty({ type: String }) + surname: string; + + @IsNotEmpty() + @ApiProperty({ type: String }) + phone: string; + @IsArray() @IsOptional() pendingStructuresLink?: Array<number>; diff --git a/src/users/interfaces/user.interface.ts b/src/users/interfaces/user.interface.ts index 243b6057b04185acfadae85a87863f0eb37f6dad..4a17a74a3671a57d8f4508e309065bffc666bcd6 100644 --- a/src/users/interfaces/user.interface.ts +++ b/src/users/interfaces/user.interface.ts @@ -3,6 +3,9 @@ import { Document } from 'mongoose'; export interface IUser extends Document { readonly _id: string; email: string; + name: string; + surname: string; + phone: string; password: string; emailVerified: boolean; validationToken: string; diff --git a/src/users/schemas/user.schema.ts b/src/users/schemas/user.schema.ts index 7e019777ac5a768bf84eb00259b2337fb910d791..93c8002fd71db84ca9b0e5e491fb6ccc5e65f494 100644 --- a/src/users/schemas/user.schema.ts +++ b/src/users/schemas/user.schema.ts @@ -5,6 +5,15 @@ export class User { @Prop({ required: true }) email: string; + @Prop({ required: true }) + name: string; + + @Prop({ required: true }) + surname: string; + + @Prop({ required: true }) + phone: string; + @Prop({ required: true }) password: string;