feat: Add review events persistence, version display, and auto-versioning system
This commit is contained in:
@@ -23,6 +23,10 @@ from app.schemas.streaming import (
|
||||
ReviewProgressEvent,
|
||||
StreamEventType
|
||||
)
|
||||
from app.schemas.review_event import (
|
||||
ReviewEvent as ReviewEventSchema,
|
||||
ReviewEventCreate
|
||||
)
|
||||
|
||||
__all__ = [
|
||||
"RepositoryCreate",
|
||||
@@ -40,5 +44,7 @@ __all__ = [
|
||||
"LLMStreamEvent",
|
||||
"ReviewProgressEvent",
|
||||
"StreamEventType",
|
||||
"ReviewEventSchema",
|
||||
"ReviewEventCreate",
|
||||
]
|
||||
|
||||
|
||||
29
backend/app/schemas/review_event.py
Normal file
29
backend/app/schemas/review_event.py
Normal file
@@ -0,0 +1,29 @@
|
||||
"""Review Event schemas"""
|
||||
|
||||
from pydantic import BaseModel, Field
|
||||
from datetime import datetime
|
||||
from typing import Optional, Dict, Any
|
||||
|
||||
|
||||
class ReviewEventBase(BaseModel):
|
||||
"""Base review event schema"""
|
||||
event_type: str = Field(..., description="Тип события")
|
||||
step: Optional[str] = Field(None, description="Шаг процесса")
|
||||
message: Optional[str] = Field(None, description="Сообщение")
|
||||
data: Optional[Dict[str, Any]] = Field(None, description="Дополнительные данные")
|
||||
|
||||
|
||||
class ReviewEventCreate(ReviewEventBase):
|
||||
"""Schema for creating review event"""
|
||||
review_id: int
|
||||
|
||||
|
||||
class ReviewEvent(ReviewEventBase):
|
||||
"""Review event response schema"""
|
||||
id: int
|
||||
review_id: int
|
||||
created_at: datetime
|
||||
|
||||
class Config:
|
||||
from_attributes = True
|
||||
|
||||
Reference in New Issue
Block a user