package com.backendsys.modules.ai.media.controller;

import com.backendsys.modules.ai.media.entity.MediaTtv;
import com.backendsys.modules.ai.media.service.MediaTtvService;
import com.backendsys.modules.ai.media.service.MediaTtvTimbreService;
import com.backendsys.modules.common.config.security.utils.SecurityUtil;
import com.backendsys.modules.common.utils.Result;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@Validated
@RestController
@Tag(name = "AI成片-音色")
public class MediaTtvTimbreController {

    @Autowired
    private MediaTtvTimbreService mediaTtvTimbreService;

    @Operation(summary = "获取音色列表")
    @PreAuthorize("@sr.hasPermission('34')")
    @GetMapping("/api/ai/media/ttv/getTimbreList")
    public Result queryMediaTtv() {
        return Result.success().put("data", mediaTtvTimbreService.selectMediaTtvTimbre());
    }

}
