- 4개 검사 엔진: HTML/CSS, 접근성(WCAG), SEO, 성능/보안 (총 50개 항목) - FastAPI 백엔드 (9개 API, SSE 실시간 진행, PDF/JSON 리포트) - Next.js 15 프론트엔드 (6개 페이지, 29개 컴포넌트, 반원 게이지 차트) - Docker Compose 배포 (Backend:8011, Frontend:3011, MongoDB:27022, Redis:6392) - 전체 테스트 32/32 PASS Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
34 lines
838 B
Python
34 lines
838 B
Python
"""
|
|
MongoDB document models and helper functions.
|
|
"""
|
|
|
|
from datetime import datetime, timezone
|
|
from typing import Optional
|
|
|
|
|
|
def create_inspection_document(
|
|
inspection_id: str,
|
|
url: str,
|
|
status: str,
|
|
overall_score: int,
|
|
grade: str,
|
|
categories: dict,
|
|
summary: dict,
|
|
created_at: datetime,
|
|
completed_at: Optional[datetime] = None,
|
|
duration_seconds: Optional[float] = None,
|
|
) -> dict:
|
|
"""Create a MongoDB document for the inspections collection."""
|
|
return {
|
|
"inspection_id": inspection_id,
|
|
"url": url,
|
|
"status": status,
|
|
"created_at": created_at,
|
|
"completed_at": completed_at,
|
|
"duration_seconds": duration_seconds,
|
|
"overall_score": overall_score,
|
|
"grade": grade,
|
|
"categories": categories,
|
|
"summary": summary,
|
|
}
|