2026-07-31 00:58:05 +02:00
|
|
|
"""Schemas for SavedView API endpoints."""
|
|
|
|
|
|
|
|
|
|
from __future__ import annotations
|
|
|
|
|
|
|
|
|
|
from typing import Any
|
2026-08-16 01:17:18 +02:00
|
|
|
|
2026-07-31 00:58:05 +02:00
|
|
|
from pydantic import BaseModel
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class SavedViewBase(BaseModel):
|
|
|
|
|
name: str
|
|
|
|
|
entity_type: str
|
|
|
|
|
view_config: dict[str, Any] = {}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class SavedViewCreate(SavedViewBase):
|
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class SavedViewResponse(SavedViewBase):
|
|
|
|
|
id: str
|
|
|
|
|
user_id: str
|
|
|
|
|
created_at: str | None = None
|
|
|
|
|
updated_at: str | None = None
|
|
|
|
|
|
|
|
|
|
model_config = {"from_attributes": True}
|