package com.css.simulation.resource.scheduler.adapter.controller;

import api.common.pojo.common.ResponseBodyVO;
import com.css.simulation.resource.scheduler.app.service.FileApplicationService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;

import javax.annotation.Resource;

@RequestMapping("/file")
@RestController
@Slf4j
public class CpuNodeController {
    @Resource
    private FileApplicationService fileApplicationService;

    @RequestMapping(value = "/uploadOsgb")
    public ResponseBodyVO<String> uploadOsgb(
            @RequestPart("file") MultipartFile file
    ) {
        fileApplicationService.uploadOsgb(file);
        return new ResponseBodyVO<>(ResponseBodyVO.Response.SUCCESS);
    }


}
