import { ApiProperty } from "@nestjs/swagger";
import { MerchantStatus } from "@prisma/client";

export class MerchantDto {
  @ApiProperty({ example: "mer_01HXYZABCDEFGHJKMNPQRSTV" })
  id!: string;

  @ApiProperty({ example: "Acme S.A." })
  name!: string;

  @ApiProperty({ example: "acme-sa" })
  slug!: string;

  @ApiProperty({ example: "billing@acme.com.py" })
  email!: string;

  @ApiProperty({ example: "PY", description: "ISO 3166-1 alpha-2." })
  defaultCountry!: string;

  @ApiProperty({ enum: MerchantStatus, example: MerchantStatus.active })
  status!: MerchantStatus;

  @ApiProperty({ example: "2026-06-07T14:30:00.000Z" })
  createdAt!: Date;

  @ApiProperty({ example: "2026-06-07T14:30:00.000Z" })
  updatedAt!: Date;
}

export class MerchantListDto {
  @ApiProperty({ type: [MerchantDto] })
  data!: MerchantDto[];

  @ApiProperty({
    required: false,
    nullable: true,
    example: "mer_01HXYZABCDEFGHJKMNPQRSTV",
    description: "Cursor para la siguiente página. `null` si no hay más resultados.",
  })
  nextCursor!: string | null;
}
