2026-02-07 10:23:29 -04:00
|
|
|
import { PartialType } from '@nestjs/swagger';
|
|
|
|
|
import { CreateDepartmentDto } from './create-department.dto';
|
2026-02-08 18:44:05 -04:00
|
|
|
import { IsString, Matches, MinLength, IsOptional, IsUrl, IsEmail } from 'class-validator';
|
2026-02-07 10:23:29 -04:00
|
|
|
import { ApiProperty } from '@nestjs/swagger';
|
|
|
|
|
|
|
|
|
|
export class UpdateDepartmentDto extends PartialType(CreateDepartmentDto) {
|
|
|
|
|
@IsOptional()
|
|
|
|
|
@IsString()
|
|
|
|
|
@Matches(/^[A-Z_]+$/, {
|
|
|
|
|
message: 'Department code must contain only uppercase letters and underscores',
|
|
|
|
|
})
|
|
|
|
|
@MinLength(3)
|
|
|
|
|
code?: string;
|
|
|
|
|
|
|
|
|
|
@IsOptional()
|
|
|
|
|
@IsString()
|
|
|
|
|
@MinLength(3)
|
|
|
|
|
name?: string;
|
|
|
|
|
|
|
|
|
|
@IsOptional()
|
|
|
|
|
@IsString()
|
|
|
|
|
description?: string;
|
|
|
|
|
|
|
|
|
|
@IsOptional()
|
|
|
|
|
@IsEmail()
|
|
|
|
|
contactEmail?: string;
|
|
|
|
|
|
|
|
|
|
@IsOptional()
|
|
|
|
|
@IsString()
|
|
|
|
|
contactPhone?: string;
|
|
|
|
|
|
|
|
|
|
@IsOptional()
|
|
|
|
|
@IsUrl()
|
|
|
|
|
webhookUrl?: string;
|
|
|
|
|
}
|