Skip to content
Snippets Groups Projects
Commit 97bb27d0 authored by Nabilsenko's avatar Nabilsenko
Browse files

fix: made numEtu optional

parent 34aa64f6
No related branches found
No related tags found
1 merge request!19fix: made numEtu optional
...@@ -2,9 +2,9 @@ import { IsBoolean, IsString, IsNotEmpty, IsOptional, IsNumber } from 'class-val ...@@ -2,9 +2,9 @@ import { IsBoolean, IsString, IsNotEmpty, IsOptional, IsNumber } from 'class-val
export class CreatePeopleDto { export class CreatePeopleDto {
@IsNumber() @IsString()
@IsOptional() @IsOptional()
numetu: number; numetu: string;
@IsString() @IsString()
@IsNotEmpty() @IsNotEmpty()
......
...@@ -2,9 +2,9 @@ import { IsOptional, IsString, IsNotEmpty, IsNumber } from 'class-validator'; ...@@ -2,9 +2,9 @@ import { IsOptional, IsString, IsNotEmpty, IsNumber } from 'class-validator';
export class UpdatePeopleDto { export class UpdatePeopleDto {
@IsNumber() @IsString()
@IsOptional() @IsOptional()
numetu: number; numetu: string;
@IsString() @IsString()
@IsOptional() @IsOptional()
......
...@@ -2,7 +2,7 @@ import { People } from '../schemas/people.schema'; ...@@ -2,7 +2,7 @@ import { People } from '../schemas/people.schema';
export class PeopleEntity { export class PeopleEntity {
_id: string; _id: string;
numetu: number; numetu: string;
firstname: string; firstname: string;
lastname: string; lastname: string;
email: string; email: string;
......
...@@ -20,8 +20,9 @@ export class People { ...@@ -20,8 +20,9 @@ export class People {
_id: any; _id: any;
@Prop({ @Prop({
type: Number, type: String,
}) numetu: number; trim: true,
}) numetu: string;
@Prop({ @Prop({
type: String, type: String,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment