feat: implement authentication and database modules with relations and group management
Added new authentication strategies (JWT and GitHub OAuth), guards, and controllers. Implemented database module, schema with relations, and group management features, including CRD operations and person-to-group associations. Integrated validation and CORS configuration.
This commit is contained in:
68
backend/src/modules/persons/dto/update-person.dto.ts
Normal file
68
backend/src/modules/persons/dto/update-person.dto.ts
Normal file
@@ -0,0 +1,68 @@
|
||||
import {
|
||||
IsString,
|
||||
IsOptional,
|
||||
IsObject,
|
||||
IsUUID,
|
||||
IsEnum,
|
||||
IsInt,
|
||||
IsBoolean,
|
||||
Min,
|
||||
Max
|
||||
} from 'class-validator';
|
||||
import { Type } from 'class-transformer';
|
||||
import { Gender, OralEaseLevel } from './create-person.dto';
|
||||
|
||||
/**
|
||||
* DTO for updating a person
|
||||
*/
|
||||
export class UpdatePersonDto {
|
||||
@IsString()
|
||||
@IsOptional()
|
||||
firstName?: string;
|
||||
|
||||
@IsString()
|
||||
@IsOptional()
|
||||
lastName?: string;
|
||||
|
||||
@IsEnum(Gender)
|
||||
@IsOptional()
|
||||
gender?: Gender;
|
||||
|
||||
@IsInt()
|
||||
@Min(1)
|
||||
@Max(5)
|
||||
@IsOptional()
|
||||
@Type(() => Number)
|
||||
technicalLevel?: number;
|
||||
|
||||
@IsBoolean()
|
||||
@IsOptional()
|
||||
@Type(() => Boolean)
|
||||
hasTechnicalTraining?: boolean;
|
||||
|
||||
@IsInt()
|
||||
@Min(1)
|
||||
@Max(5)
|
||||
@IsOptional()
|
||||
@Type(() => Number)
|
||||
frenchSpeakingLevel?: number;
|
||||
|
||||
@IsEnum(OralEaseLevel)
|
||||
@IsOptional()
|
||||
oralEaseLevel?: OralEaseLevel;
|
||||
|
||||
@IsInt()
|
||||
@IsOptional()
|
||||
@Min(18)
|
||||
@Max(100)
|
||||
@Type(() => Number)
|
||||
age?: number;
|
||||
|
||||
@IsUUID()
|
||||
@IsOptional()
|
||||
projectId?: string;
|
||||
|
||||
@IsObject()
|
||||
@IsOptional()
|
||||
attributes?: Record<string, any>;
|
||||
}
|
||||
Reference in New Issue
Block a user