import { IsDateString, IsOptional, IsEnum } from 'class-validator';
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
import { LicenseType } from '@prisma/client';

export class RenewLicenseDto {
  @ApiProperty({ description: 'New end date (ISO 8601)' })
  @IsDateString()
  newEndDate: string;

  @ApiPropertyOptional({ description: 'Optionally change license type', enum: LicenseType })
  @IsEnum(LicenseType)
  @IsOptional()
  type?: LicenseType;
}
