package com.persagy.server.controllers.objects

import com.persagy.server.datacenter.models.requests.UpDataFloorAndBuildingRequests
import com.persagy.server.services.assistant.UpDataFloorAndBuildingServuce
import com.persagy.service.models.responses.SBaseResponse
import io.swagger.v3.oas.annotations.Operation
import io.swagger.v3.oas.annotations.tags.Tag
import org.springframework.web.bind.annotation.PostMapping
import org.springframework.web.bind.annotation.RequestBody
import org.springframework.web.bind.annotation.RequestMapping
import org.springframework.web.bind.annotation.RestController

/**
 * 关系-修改对象的建筑楼层信息
 *
 * @author
 */

@Tag(name = "关系-修改对象的建筑楼层信息")
@RestController
@RequestMapping("/update-relationship")
class UpDataFloorAndBuildingController {

    /**
     * 修改空间和楼层建筑的关系
     *
     * @param   upDataFloorAndBuildingRequestsList     修改对象列表
     */
    @Operation(summary = "修改业务空间对象和建筑楼层的关系", description = "spaceId 业务空间id,id 楼层或建筑id,type  业务空间的类型")
    @PostMapping(value = ["/update-sp"])
    fun  spFloorAndBuilding(@RequestBody upDataFloorAndBuildingRequestsList:ArrayList<UpDataFloorAndBuildingRequests>): SBaseResponse {
        return UpDataFloorAndBuildingServuce.upDataFloorORBuilding(upDataFloorAndBuildingRequestsList)
    } // Function spFloorAndBuilding

} // Class UpDataFloorAndBuildingController