import { ApiProperty } from '@nestjs/swagger';
import { PaymentProvider } from '@prisma/client';
import { IsEnum, IsIn, IsString, IsUrl } from 'class-validator';

export class FeatureListingDto {
  @ApiProperty({
    enum: ['3_days', '7_days', '30_days'],
    example: '7_days',
    description: 'Featured listing package duration',
  })
  @IsIn(['3_days', '7_days', '30_days'])
  package!: '3_days' | '7_days' | '30_days';

  @ApiProperty({ enum: PaymentProvider, example: 'VNPAY', description: 'Payment provider' })
  @IsEnum(PaymentProvider)
  provider!: PaymentProvider;

  @ApiProperty({ example: 'https://goodgo.vn/payment/callback', description: 'Payment return URL' })
  @IsUrl()
  @IsString()
  returnUrl!: string;
}
