Initial commit: svg backend
This commit is contained in:
67
backend/app/schemas/scheme_registry.py
Normal file
67
backend/app/schemas/scheme_registry.py
Normal file
@@ -0,0 +1,67 @@
|
||||
from typing import List
|
||||
|
||||
from pydantic import BaseModel
|
||||
|
||||
|
||||
class SchemeListItem(BaseModel):
|
||||
scheme_id: str
|
||||
source_upload_id: str
|
||||
name: str
|
||||
status: str
|
||||
current_version_number: int
|
||||
published_at: str | None
|
||||
normalized_elements_count: int
|
||||
normalized_seats_count: int
|
||||
normalized_groups_count: int
|
||||
normalized_sectors_count: int
|
||||
created_at: str
|
||||
|
||||
|
||||
class SchemeListResponse(BaseModel):
|
||||
items: List[SchemeListItem]
|
||||
total: int
|
||||
|
||||
|
||||
class SchemeDetailResponse(BaseModel):
|
||||
scheme_id: str
|
||||
source_upload_id: str
|
||||
name: str
|
||||
status: str
|
||||
current_version_number: int
|
||||
published_at: str | None
|
||||
normalized_elements_count: int
|
||||
normalized_seats_count: int
|
||||
normalized_groups_count: int
|
||||
normalized_sectors_count: int
|
||||
created_at: str
|
||||
|
||||
|
||||
class SchemeCurrentResponse(BaseModel):
|
||||
scheme_id: str
|
||||
scheme_version_id: str
|
||||
version_number: int
|
||||
status: str
|
||||
normalized_storage_path: str
|
||||
normalized_elements_count: int
|
||||
normalized_seats_count: int
|
||||
normalized_groups_count: int
|
||||
normalized_sectors_count: int
|
||||
created_at: str
|
||||
|
||||
|
||||
class SchemePublishResponse(BaseModel):
|
||||
scheme_id: str
|
||||
status: str
|
||||
current_version_number: int
|
||||
published_at: str | None
|
||||
|
||||
|
||||
class SchemeRollbackRequest(BaseModel):
|
||||
target_version_number: int
|
||||
|
||||
|
||||
class SchemeRollbackResponse(BaseModel):
|
||||
scheme_id: str
|
||||
status: str
|
||||
current_version_number: int
|
||||
published_at: str | None
|
||||
Reference in New Issue
Block a user