package com.xindazhou.vehicle.api;

import com.xindazhou.framework.common.pojo.CommonResult;
import com.xindazhou.vehicle.api.dto.status.VehicleStatusRespDTO;
import com.xindazhou.vehicle.service.VehicleStatusService;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RestController;

import jakarta.annotation.Resource;

import static com.xindazhou.framework.common.pojo.CommonResult.success;

/**
 * 车辆状态 API 实现类
 *
 * @author xindazhou
 */
@RestController
@Validated
public class VehicleStatusApiImpl implements VehicleStatusApi {

    @Resource
    private VehicleStatusService vehicleStatusService;

    @Override
    public CommonResult<VehicleStatusRespDTO> getVehicleStatus(Long vehicleId) {
        VehicleStatusRespDTO status = vehicleStatusService.getVehicleStatus(vehicleId);
        return success(status);
    }

}

