File

src/project/dto/create-project.dto.ts

Index

Properties

Properties

Optional budget
Type : number
Decorators :
@IsNumber()
@IsOptional()
@ApiPropertyOptional()
Optional businessObjective
Type : string
Decorators :
@IsString()
@IsOptional()
@ApiPropertyOptional()
businessUnit
Type : string
Decorators :
@IsNotEmpty({message: 'Project businessUnit missing'})
@ApiProperty({required: true})
description
Type : string
Decorators :
@IsNotEmpty({message: 'Project description missing'})
@IsString()
@ApiProperty({required: true})
Optional estimatedRevenue
Type : number
Decorators :
@IsNumber()
@IsOptional()
@ApiPropertyOptional()
Optional impactNotes
Type : string
Decorators :
@IsString()
@IsOptional()
@ApiPropertyOptional()
Optional isPublic
Type : boolean
Decorators :
@IsBoolean()
@IsOptional()
@ApiPropertyOptional()
Optional keyResults
Type : string
Decorators :
@IsString()
@IsOptional()
@ApiPropertyOptional()
Optional kpis
Type : string
Decorators :
@IsString()
@IsOptional()
@ApiPropertyOptional()
name
Type : string
Decorators :
@IsNotEmpty()
@IsString()
@ApiProperty({required: true})
Optional targetVariable
Type : string
Decorators :
@IsString()
@IsOptional()
@ApiPropertyOptional()
teamMembers
Type : string
Decorators :
@IsNotEmpty()
@IsString()
@ApiProperty()
useCaseType
Type : ProjectUseCaseType
Decorators :
@IsNotEmpty({message: 'Project use case type missing'})
@ApiProperty({required: true})
@IsEnum(ProjectUseCaseType, {each: true})
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;
}

results matching ""

    No results matching ""