package com.xindazhou.vehicle.api.dto.control;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import java.util.Map;

/**
 * 车辆控制 Request DTO
 *
 * @author xindazhou
 */
@Schema(description = "RPC 服务 - 车辆控制 Request DTO")
@Data
public class VehicleControlReqDTO {

    @Schema(description = "车辆编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @NotNull(message = "车辆编号不能为空")
    private Long vehicleId;

    @Schema(description = "用户编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
    @NotNull(message = "用户编号不能为空")
    private Long userId;

    @Schema(description = "用户类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @NotNull(message = "用户类型不能为空")
    private Integer userType;

    @Schema(description = "控制指令：UNLOCK-开锁, LOCK-关锁, START-启动, STOP-熄火, HORN-鸣笛, LIGHT-灯光", 
            requiredMode = Schema.RequiredMode.REQUIRED, example = "UNLOCK",
            allowableValues = {"UNLOCK", "LOCK", "START", "STOP", "HORN", "LIGHT"})
    @NotEmpty(message = "控制指令不能为空")
    private String command;

    @Schema(description = "控制参数", example = "{\"duration\": 5000}")
    private Map<String, Object> params;

}

