o2o-infinith-backend/app/api/plans.py

36 lines
1.1 KiB
Python

import logging
from fastapi import APIRouter, Depends, status
from common.deps import verify_api_key
from models.plan import PlanCreate, PlanResponse
router = APIRouter(prefix="/api/plans", tags=["plans"], dependencies=[Depends(verify_api_key)])
logger = logging.getLogger(__name__)
@router.post("", status_code=status.HTTP_201_CREATED, response_model=PlanResponse)
async def create_plan(body: PlanCreate):
logger.info("POST /api/plans run_id=%s", body.analysis_run_id)
return PlanResponse(
id="33333333-3333-3333-3333-333333333333",
analysis_run_id="22222222-2222-2222-2222-222222222222",
brand_guide={},
channel_strategies=[],
content_strategy={},
calendar=[],
created_at="2026-04-20T09:10:00Z",
)
@router.get("/{id}", response_model=PlanResponse)
async def get_plan(id: str):
logger.info("GET /api/plans/%s", id)
return PlanResponse(
id=id,
analysis_run_id="22222222-2222-2222-2222-222222222222",
brand_guide={},
channel_strategies=[],
content_strategy={},
calendar=[],
created_at="2026-04-20T09:10:00Z",
)