import { ApiProperty } from "@nestjs/swagger"
import { IsNotEmpty, IsString } from "class-validator"

export class CreateDepartmentDto {
  @ApiProperty({
    description: "The name of the department",
    example: "Human Resources",
  })
  @IsString({ message: "Department name must be a string." })
  @IsNotEmpty({ message: "Department name cannot be empty." })
  name: string

  @ApiProperty({
    description: "Description of the department",
    example: "Handles recruitment and employee welfare",
  })
  @IsString({ message: "Description must be a string." })
  description: string

  @ApiProperty({
    description: "Team member ID associated with the department",
    example: 101,
    required: false,
  })
  team_member_id?: number
}
