package com.sckw.fleet.model.vo;

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

import java.io.Serial;
import java.io.Serializable;

/**
 * 车辆业务状态统计返回数据
 * @author system
 */
@Data
@Schema(description = "车辆业务状态统计")
public class TruckBusinessStatusStatisticsVo implements Serializable {
    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 全部车辆数量
     */
    @Schema(description = "全部车辆数量")
    private Long totalCount;

    /**
     * 空闲车辆数量（business_status = 0）
     */
    @Schema(description = "空闲车辆数量")
    private Long idleCount;

    /**
     * 任务中车辆数量（business_status = 1）
     */
    @Schema(description = "任务中车辆数量")
    private Long busyCount;

    public static TruckBusinessStatusStatisticsVo of(Long totalCount, Long idleCount, Long busyCount) {
        TruckBusinessStatusStatisticsVo vo = new TruckBusinessStatusStatisticsVo();
        vo.setTotalCount(totalCount);
        vo.setIdleCount(idleCount);
        vo.setBusyCount(busyCount);
        return vo;
    }
}
