src/project/dto/create-project.dto.ts
Properties |
|
| Optional budget |
Type : number
|
Decorators :
@IsNumber()
|
|
Defined in src/project/dto/create-project.dto.ts:56
|
| Optional businessObjective |
Type : string
|
Decorators :
@IsString()
|
|
Defined in src/project/dto/create-project.dto.ts:31
|
| businessUnit |
Type : string
|
Decorators :
@IsNotEmpty({message: 'Project businessUnit missing'})
|
|
Defined in src/project/dto/create-project.dto.ts:70
|
| description |
Type : string
|
Decorators :
@IsNotEmpty({message: 'Project description missing'})
|
|
Defined in src/project/dto/create-project.dto.ts:26
|
| Optional estimatedRevenue |
Type : number
|
Decorators :
@IsNumber()
|
|
Defined in src/project/dto/create-project.dto.ts:46
|
| Optional impactNotes |
Type : string
|
Decorators :
@IsString()
|
|
Defined in src/project/dto/create-project.dto.ts:51
|
| Optional isPublic |
Type : boolean
|
Decorators :
@IsBoolean()
|
|
Defined in src/project/dto/create-project.dto.ts:21
|
| Optional keyResults |
Type : string
|
Decorators :
@IsString()
|
|
Defined in src/project/dto/create-project.dto.ts:36
|
| Optional kpis |
Type : string
|
Decorators :
@IsString()
|
|
Defined in src/project/dto/create-project.dto.ts:41
|
| name |
Type : string
|
Decorators :
@IsNotEmpty()
|
|
Defined in src/project/dto/create-project.dto.ts:16
|
| Optional targetVariable |
Type : string
|
Decorators :
@IsString()
|
|
Defined in src/project/dto/create-project.dto.ts:61
|
| teamMembers |
Type : string
|
Decorators :
@IsNotEmpty()
|
|
Defined in src/project/dto/create-project.dto.ts:66
|
| useCaseType |
Type : ProjectUseCaseType
|
Decorators :
@IsNotEmpty({message: 'Project use case type missing'})
|
|
Defined in src/project/dto/create-project.dto.ts:75
|
import { ApiProperty, ApiPropertyOptional } from "@nestjs/swagger";
import {
IsBoolean,
IsNotEmpty,
IsNumber,
IsOptional,
IsString,
IsEnum,
} from "class-validator";
import { ProjectUseCaseType } from "../entities/project.entity";
export class CreateProjectDto {
@IsNotEmpty()
@IsString()
@ApiProperty({ required: true })
name: string;
@IsBoolean()
@IsOptional()
@ApiPropertyOptional()
isPublic?: boolean;
@IsNotEmpty({ message: "Project description missing" })
@IsString()
@ApiProperty({ required: true })
description: string;
@IsString()
@IsOptional()
@ApiPropertyOptional()
businessObjective?: string;
@IsString()
@IsOptional()
@ApiPropertyOptional()
keyResults?: string;
@IsString()
@IsOptional()
@ApiPropertyOptional()
kpis?: string;
@IsNumber()
@IsOptional()
@ApiPropertyOptional()
estimatedRevenue?: number;
@IsString()
@IsOptional()
@ApiPropertyOptional()
impactNotes?: string;
@IsNumber()
@IsOptional()
@ApiPropertyOptional()
budget?: number;
@IsString()
@IsOptional()
@ApiPropertyOptional()
targetVariable?: string;
@IsNotEmpty()
@IsString()
@ApiProperty()
teamMembers: string;
@IsNotEmpty({ message: "Project businessUnit missing" })
@ApiProperty({ required: true })
businessUnit: string;
@IsNotEmpty({ message: "Project use case type missing" })
@ApiProperty({ required: true })
@IsEnum(ProjectUseCaseType, { each: true })
useCaseType: ProjectUseCaseType;
}