added dto

This commit is contained in:
hannathkadher
2024-12-09 12:44:57 +04:00
parent bab57ff5eb
commit 459e971498
3 changed files with 34 additions and 0 deletions

View File

@ -0,0 +1,21 @@
import { ApiProperty } from '@nestjs/swagger';
import { IsString, IsNotEmpty, IsOptional } from 'class-validator';
export class CreateProjectDto {
@ApiProperty({
example: 'Project 1',
description: 'Name of the project',
})
@IsString()
@IsNotEmpty()
name: string;
@ApiProperty({
example: 'Optional description of the project',
description: 'Description of the project',
required: false,
})
@IsString()
@IsOptional()
description?: string;
}

View File

@ -0,0 +1,11 @@
import { ApiProperty } from '@nestjs/swagger';
import { IsUUID } from 'class-validator';
export class GetProjectParam {
@ApiProperty({
description: 'UUID of the Project',
example: 'd290f1ee-6c54-4b01-90e6-d701748f0851',
})
@IsUUID()
projectUuid: string;
}

2
src/project/dto/index.ts Normal file
View File

@ -0,0 +1,2 @@
export * from './create-project.dto';
export * from './get-project.param';