package com.qaup.collision.datacollector.model.dto;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;

/**
 * 无人车状态查询请求DTO
 * 
 * @author AI Assistant
 * @version 1.0
 * @since 2024-12-19
 */
public class VehicleStateRequest {

    /**
     * 消息唯一ID
     */
    @NotBlank(message = "消息ID不能为空")
    private String transId;

    /**
     * 时间戳
     */
    @NotNull(message = "时间戳不能为空")
    private Long timestamp;

    /**
     * 车辆ID（数字主键）
     */
    @NotNull(message = "车辆ID不能为空")
    private Long vehicleId;
    
    /**
     * 车牌号（业务标识符）
     */
    @NotBlank(message = "车牌号不能为空")
    private String licensePlate;

    /**
     * 是否查询单个车辆
     * true: 单个车辆, false: 所有车辆
     */
    @NotNull(message = "查询类型不能为空")
    private Boolean isSingle;

    // Constructors
    public VehicleStateRequest() {}

    public VehicleStateRequest(String transId, Long timestamp, Long vehicleId, String licensePlate, Boolean isSingle) {
        this.transId = transId;
        this.timestamp = timestamp;
        this.vehicleId = vehicleId;
        this.licensePlate = licensePlate;
        this.isSingle = isSingle;
    }

    // Getters and Setters
    public String getTransId() {
        return transId;
    }

    public void setTransId(String transId) {
        this.transId = transId;
    }

    public Long getTimestamp() {
        return timestamp;
    }

    public void setTimestamp(Long timestamp) {
        this.timestamp = timestamp;
    }

    public Long getVehicleId() {
        return vehicleId;
    }

    public void setVehicleId(Long vehicleId) {
        this.vehicleId = vehicleId;
    }
    
    public String getLicensePlate() {
        return licensePlate;
    }

    public void setLicensePlate(String licensePlate) {
        this.licensePlate = licensePlate;
    }

    public Boolean getIsSingle() {
        return isSingle;
    }

    public void setIsSingle(Boolean isSingle) {
        this.isSingle = isSingle;
    }

    @Override
    public String toString() {
        return "VehicleStateRequest{" +
                "transId='" + transId + '\'' +
                ", timestamp=" + timestamp +
                ", vehicleId='" + vehicleId + '\'' +
                ", isSingle=" + isSingle +
                '}';
    }
} 