package com.persagy.server.controllers.model

import com.persagy.server.datacenter.models.entities.assistant.ModelKey
import com.persagy.server.datacenter.models.requests.ModelKeyRequest
import com.persagy.server.services.models.ModelService
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 wx  <zhangweixin@sagacloud.com>
 * @date  2020/10/16 12:10
 */
@Tag(name = "0001、模型")
@RestController
@RequestMapping("/model")
class ModelController {

    /**
     * 模型文件下载地址 key
     */
    @Operation(summary = "模型文件下载地址 key", description = "projectId 项目id，floorId楼层id ")
    @PostMapping(value = ["/key"])
    fun modelKey(@RequestBody modelKeyRequest: ModelKeyRequest): ModelKey {
        return  ModelService.modelKey(modelKeyRequest)
    }

}