mirror of
https://github.com/Rarebuffalo/securelens-backend.git
synced 2026-06-19 07:00:30 +00:00
updated the schema
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
from datetime import datetime
|
||||
from pydantic import BaseModel, HttpUrl
|
||||
from typing import List, Optional, Dict, Any
|
||||
|
||||
@@ -20,6 +21,7 @@ class CodeScanResponse(BaseModel):
|
||||
repo_url: str
|
||||
summary: str
|
||||
issues: List[VulnerabilityIssue]
|
||||
created_at: Optional[datetime] = None
|
||||
|
||||
class CodeChatRequest(BaseModel):
|
||||
scan_id: str
|
||||
@@ -27,3 +29,16 @@ class CodeChatRequest(BaseModel):
|
||||
|
||||
class CodeChatResponse(BaseModel):
|
||||
reply: str
|
||||
|
||||
class CodeScanHistoryItem(BaseModel):
|
||||
id: str
|
||||
repo_url: str
|
||||
created_at: datetime
|
||||
|
||||
model_config = {"from_attributes": True}
|
||||
|
||||
class CodeScanHistoryResponse(BaseModel):
|
||||
scans: List[CodeScanHistoryItem]
|
||||
total: int
|
||||
page: int
|
||||
per_page: int
|
||||
|
||||
Reference in New Issue
Block a user