mirror of
https://github.com/SyncrowIOT/backend.git
synced 2026-10-23 18:07:54 +00:00
added dto
This commit is contained in:
@@ -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;
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
export * from './create-project.dto';
|
||||
export * from './get-project.param';
|
||||
Reference in New Issue
Block a user