import { ApiProperty } from "@nestjs/swagger"
import { IsNotEmpty, IsNumber, IsOptional, IsString } from "class-validator"

export class CreateCustomerEpisodeDto {
  @ApiProperty({
    example: 1,
    description: "The ID of the customer",
  })
  @IsNotEmpty()
  @IsNumber()
  customer_id: number

  @ApiProperty({
    example: 1,
    description: "The episode number",
  })
  @IsNotEmpty()
  @IsNumber()
  episode_number: number

  @ApiProperty({
    example: "2023-01-01T00:00:00.000Z",
    description: "The start date of the episode",
    required: false,
  })
  @IsOptional()
  start_date?: Date

  @ApiProperty({
    example: "2023-12-31T00:00:00.000Z",
    description: "The end date of the episode",
    required: false,
  })
  @IsOptional()
  end_date?: Date

  @ApiProperty({
    example: "active",
    description: "The status of the episode",
    required: false,
  })
  @IsOptional()
  @IsString()
  status?: string
}
