import { ApiProperty } from '@nestjs/swagger';
import { IsString, IsDate, IsEnum } from 'class-validator';
import { Type } from 'class-transformer';
import { PlanEnum } from '../interface/plan.interface';

export class UpgradeSubscriptionDto {
    @ApiProperty({ example: 'premium', enum: PlanEnum, description: 'New plan for the subscription' })
    @IsEnum(PlanEnum)
    newPlan!: PlanEnum;

    @ApiProperty({ example: '2025-12-31', description: 'New subscription end date' })
    @Type(() => Date)
    @IsDate()
    subscriptionEndDate!: Date;
}
