import { IsNotEmpty, IsString, MaxLength } from 'class-validator';
import { MqttPointDto } from '../../ingest/dto/mqtt-messages.dto';

// What the simulator UI sends the backend. Mirrors a devices/<serial>/log
// payload plus the two fields that live in the topic/routing rather than the
// wire payload itself (serial, jobId) so this DTO doubles as validation for
// both the REST call and the outgoing MQTT message.
export class SimPublishPointDto extends MqttPointDto {
  @IsString()
  @IsNotEmpty()
  @MaxLength(64)
  serial: string;

  @IsString()
  @IsNotEmpty()
  jobId: string;
}
