import { IsDateString, IsEnum, IsOptional, IsString } from 'class-validator'

export class UpdateSubscriptionDto {
  @IsOptional() @IsEnum(['mvp', 'pro', 'enterprise'])
  plan?: 'mvp' | 'pro' | 'enterprise'

  @IsOptional() @IsEnum(['trialing', 'active', 'past_due', 'canceled', 'incomplete', 'incomplete_expired'])
  status?: 'trialing' | 'active' | 'past_due' | 'canceled' | 'incomplete' | 'incomplete_expired'

  @IsOptional() @IsString() stripeCustomerId?: string
  @IsOptional() @IsString() stripeSubscriptionId?: string
  @IsOptional() @IsDateString() trialEndsAt?: string
  @IsOptional() @IsDateString() currentPeriodEnd?: string
  @IsOptional() @IsDateString() canceledAt?: string
}
