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

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

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