28 lines
860 B
Python
28 lines
860 B
Python
# [DEF:backend.src.models.dashboard:Module]
|
|
# @SEMANTICS: dashboard, model, metadata, migration
|
|
# @PURPOSE: Defines data models for dashboard metadata and selection.
|
|
# @LAYER: Model
|
|
# @RELATION: USED_BY -> backend.src.api.routes.migration
|
|
|
|
from pydantic import BaseModel
|
|
from typing import List
|
|
|
|
# [DEF:DashboardMetadata:Class]
|
|
# @PURPOSE: Represents a dashboard available for migration.
|
|
class DashboardMetadata(BaseModel):
|
|
id: int
|
|
title: str
|
|
last_modified: str
|
|
status: str
|
|
# [/DEF:DashboardMetadata:Class]
|
|
|
|
# [DEF:DashboardSelection:Class]
|
|
# @PURPOSE: Represents the user's selection of dashboards to migrate.
|
|
class DashboardSelection(BaseModel):
|
|
selected_ids: List[int]
|
|
source_env_id: str
|
|
target_env_id: str
|
|
replace_db_config: bool = False
|
|
# [/DEF:DashboardSelection:Class]
|
|
|
|
# [/DEF:backend.src.models.dashboard:Module] |