package cn.iocoder.yudao.module.system.controller.admin.robot.vo;

import cn.iocoder.yudao.module.system.controller.admin.robot.camera.RobotCameraAddVO;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.List;
import java.util.Set;

@Schema(description = "管理后台 - 车辆信息新增/修改 Request VO")
@Data
public class RobotInformationSaveReqVO {

    @Schema(description = "主键ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "21881")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    @Schema(description = "车辆类型表id", example = "28234")
    @NotNull(message = "车辆类型不能为空")
    private Long robotModelId;

    @Schema(description = "车辆类型")
    private String robotModelNumber;

    @Schema(description = "AGV编号")
    @NotEmpty(message = "AGV编号不能为空")
    private String robotNo;

    @Schema(description = "任务模式（0：拒收任务、1：正常）", requiredMode = Schema.RequiredMode.REQUIRED)
    private Integer robotTaskModel;

    @Schema(description = "mac地址")
    @NotEmpty(message = "mac地址不能为空")
    private String macAddress;

    @Schema(description = "上传图片附件", example = "https://www.iocoder.cn")
    private String url;

    @Schema(description = "AGV状态（0：暂停且无任务、1：暂停(有处理中的任务)、2：任务中、3：待命、4:充电中）", requiredMode = Schema.RequiredMode.REQUIRED, example = "2")
    private Integer robotStatus;

    @Schema(description = "楼层/区域(json)")
    @NotEmpty(message = "楼层/区域不能为空")
    private Set<Long> floorAreaJson;

    @Schema(description = "自动充电电量")
    private Integer autoCharge;

    @Schema(description = "是否自动充电（0:手动充电,1:自动充电）")
    private Integer chargeType;

    @Schema(description = "robot_task_detail的id")
    private Long taskDetailId;

    @Schema(description = "车辆IP")
    @Size(min = 0, max = 20, message = "车辆IP长度超过限制")
    private String robotIp;

    @Schema(description = "车辆端口")
    @Range(min = 0, max = 999999, message = "车辆端口长度超过限制")
    private Long robotPort;

    @Schema(description = "摄像头相关的配置")
    private List<RobotCameraAddVO> cameraAddVOList;
}
