import { IsString, IsOptional, IsObject, IsUUID, IsEnum } from "class-validator";
import { EventType, ALL_EVENT_TYPES } from "../event-types";

/**
 * DTO for creating a job event
 */
export class CreateEventDto {
  @IsEnum(ALL_EVENT_TYPES)
  type!: EventType;

  @IsString()
  actor!: string;

  @IsObject()
  payload!: Record<string, unknown>;

  @IsOptional()
  @IsUUID()
  stepId?: string;
}
