Files
Aegis/backend/app/schemas/evidence.py
Kitos 4f6dd838fd feat: Phase 3 - CRUD core for Techniques, Tests and Evidence (T-014 to T-017)
- Add Pydantic schemas for Technique, Test and Evidence
- Add CRUD endpoints for Techniques (list with filters, detail, create, update, review)
- Add CRUD endpoints for Tests (create, detail, update, validate, reject)
- Add evidence upload with SHA-256 integrity and presigned download URLs
- Add MinIO/S3 storage client with bucket auto-creation on startup
- Add status_service to recalculate technique coverage from test results
- Add require_any_role RBAC dependency for multi-role authorization
- Update README with API endpoints reference and project structure
2026-02-06 13:52:27 +01:00

24 lines
560 B
Python

"""Pydantic schemas for Evidence endpoints."""
import uuid
from datetime import datetime
from pydantic import BaseModel, ConfigDict
class EvidenceOut(BaseModel):
"""Representation of an evidence record returned by the API.
``download_url`` is a presigned URL generated at response time.
"""
id: uuid.UUID
test_id: uuid.UUID
file_name: str
sha256_hash: str
uploaded_by: uuid.UUID | None = None
uploaded_at: datetime | None = None
download_url: str | None = None
model_config = ConfigDict(from_attributes=True)