feat(env): add global production context and safety indicators

This commit is contained in:
2026-02-25 20:46:00 +03:00
parent 999c0c54df
commit 3801ca13d9
11 changed files with 320 additions and 62 deletions

View File

@@ -31,6 +31,7 @@ class EnvironmentResponse(BaseModel):
id: str
name: str
url: str
is_production: bool = False
backup_schedule: Optional[ScheduleSchema] = None
# [/DEF:EnvironmentResponse:DataClass]
@@ -63,6 +64,7 @@ async def get_environments(
id=e.id,
name=e.name,
url=e.url,
is_production=getattr(e, "is_production", False),
backup_schedule=ScheduleSchema(
enabled=e.backup_schedule.enabled,
cron_expression=e.backup_schedule.cron_expression