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

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

import java.time.LocalDateTime;

/**
 * 车辆状态 Response DTO
 *
 * @author xindazhou
 */
@Schema(description = "RPC 服务 - 车辆状态 Response DTO")
@Data
public class VehicleStatusRespDTO {

    @Schema(description = "车辆编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    private Long vehicleId;

    @Schema(description = "在线状态：0-离线, 1-在线", example = "1",
            allowableValues = {"0", "1"})
    private Integer onlineStatus;

    @Schema(description = "运行状态：STOPPED-停止, RUNNING-运行, CHARGING-充电, FAULT-故障", example = "RUNNING",
            allowableValues = {"STOPPED", "RUNNING", "CHARGING", "FAULT"})
    private String runStatus;

    @Schema(description = "电量百分比（0-100）", example = "85")
    private Integer batteryLevel;

    @Schema(description = "剩余里程（公里）", example = "120.5")
    private Double remainingMileage;

    @Schema(description = "总里程（公里）", example = "15000.5")
    private Double totalMileage;

    @Schema(description = "速度（km/h）", example = "45.0")
    private Double speed;

    @Schema(description = "最后上报时间")
    private LocalDateTime lastReportTime;

    @Schema(description = "更新时间")
    private LocalDateTime updateTime;

}

