package com.nokia.domainb.capability.controller;

import com.nokia.domainb.capability.dto.RouteDTO;
import com.nokia.domainb.capability.dto.SaAndVolteDTO;
import com.nokia.domainb.capability.dto.SaDTO;
import com.nokia.domainb.capability.service.DomainService;
import com.nokia.domainb.common.http.R;
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;

@RequestMapping("/domainB/api")
@RestController
public class DomainController {
    private final DomainService domainService;

    public DomainController(DomainService domainService) {
        this.domainService = domainService;
    }

    /**
     * 路由查询
     */
    @PostMapping("/route/")
    public R route(@RequestBody RouteDTO dto) {
        return domainService.route(dto);
    }

    /**
     * 5GSA查询
     */
    @PostMapping("/sa/")
    public R sa(@RequestBody SaDTO dto) {
        return domainService.sa(dto);
    }

    /**
     * 功能查询
     */
    @PostMapping("/product/saAndVolte/")
    public R saAndVolte(@RequestBody SaAndVolteDTO dto) {
        return domainService.saAndVolte(dto);
    }
}
