import { Router } from 'express';
import { CreativeController } from '../controllers/CreativeController';
import { requireTraceContext } from '../../core/guards/trace-context.guard';
import { requirePermission } from '../../core/guards/rbac.guard';

const router = Router();

/**
 * [BIZ_CRE_01] 多模态 AI 创作 API
 */

// 创建创作任务 (TTS/IMAGE/VIDEO)
router.post('/tasks', requireTraceContext, requirePermission('order:write'), CreativeController.createTask);

// 获取任务详情
router.get('/tasks/:taskId', requireTraceContext, CreativeController.getTask);

// 获取素材库
router.get('/assets', requireTraceContext, CreativeController.getAssets);

export default router;
