package com.bocloud.ims.booter.controller.resource.compute;

import com.bocloud.common.model.BocloudResult;
import com.bocloud.ims.interfaces.resource.FolderService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName: FolderController
 * @Description: 文件夹
 * @Author lxy
 * @Date 2021/5/12 10:25
 */
@Api(value = "FolderModel", tags = "Folder管理")
@RestController
@RequestMapping("/v1/folder")
public class FolderController {
    @Autowired
    private FolderService folderService;

    @GetMapping
    @ApiOperation(tags = {"CMC",
            "CSC"},value = "查询文件夹树", httpMethod = "GET")
    public BocloudResult list(@RequestParam(value = "vdcName", required = true) String vdcName,
                              @RequestParam(value = "vendorId", required = true) Long vendorId) {
        return folderService.list(vendorId,vdcName);
    }
}
