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 pydantic import BaseModel, HttpUrl
|
||||||
from typing import List, Optional, Dict, Any
|
from typing import List, Optional, Dict, Any
|
||||||
|
|
||||||
@@ -20,6 +21,7 @@ class CodeScanResponse(BaseModel):
|
|||||||
repo_url: str
|
repo_url: str
|
||||||
summary: str
|
summary: str
|
||||||
issues: List[VulnerabilityIssue]
|
issues: List[VulnerabilityIssue]
|
||||||
|
created_at: Optional[datetime] = None
|
||||||
|
|
||||||
class CodeChatRequest(BaseModel):
|
class CodeChatRequest(BaseModel):
|
||||||
scan_id: str
|
scan_id: str
|
||||||
@@ -27,3 +29,16 @@ class CodeChatRequest(BaseModel):
|
|||||||
|
|
||||||
class CodeChatResponse(BaseModel):
|
class CodeChatResponse(BaseModel):
|
||||||
reply: str
|
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