package com.muyu.enterprise.controller.car;


import com.muyu.common.core.domain.Result;
import com.muyu.common.core.web.controller.BaseController;
import com.muyu.enterprise.domain.car.VehicleType;
import com.muyu.enterprise.service.car.VehicleTypeService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 车辆类型控制层
 * @Author：李庆帅
 * @Package：com.muyu.car.controller
 * @Project：cloud-server
 * @name：VehicleTypeController
 * @Date：2024/9/26 22:23
 * @Description: 车辆类型实体类
 */
@Log4j2
@RestController
@RequestMapping("/vehicleType")
@Tag(name = "车辆类型控制层", description = "车辆类型控制层")
public class VehicleTypeController  extends BaseController
{
    @Autowired
    private VehicleTypeService vehicleTypeService;

    /**
     * 车辆类型查询
     * @return 返回结果
     */
    @RequestMapping(path = "/", method = RequestMethod.POST)
    @Operation(summary = "车辆类型列表",description = "车辆类型列表")
    public Result<List<VehicleType>> findAll(){
        return Result.success(vehicleTypeService.list());
    }



}
