import { IsString, IsOptional, IsInt, MaxLength, Min } from 'class-validator';
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';

export class CreateAccountTypeDto {
  @ApiProperty({ maxLength: 100, description: 'Name des Kontotyps' })
  @IsString()
  @MaxLength(100)
  name!: string;

  @ApiPropertyOptional({ default: 0, description: 'Sortierreihenfolge' })
  @IsOptional()
  @IsInt()
  @Min(0)
  sortOrder?: number;
}
