feat: 웹사이트 표준화 검사 도구 구현
- 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>
This commit is contained in:
33
backend/app/models/database.py
Normal file
33
backend/app/models/database.py
Normal file
@ -0,0 +1,33 @@
|
||||
"""
|
||||
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,
|
||||
}
|
||||
Reference in New Issue
Block a user