bim-twin-viewer/backend/app/schemas/element.py
warnason 5cb6f1403b Initial project scaffold: FastAPI backend + Vue.js frontend
- FastAPI with async SQLAlchemy models for IFC elements
- IFC file upload and parsing via IfcOpenShell
- REST API for projects, elements, and properties
- Vue.js 3 frontend shell with Three.js dependency
- Docker Compose for full-stack local development
- PostgreSQL 16 as database
- CI pipeline for Forgejo Actions
- Project documentation and API overview
2026-04-20 18:01:12 +02:00

41 lines
695 B
Python

"""Pydantic response schemas for API serialization."""
from uuid import UUID
from pydantic import BaseModel
class PropertyOut(BaseModel):
id: UUID
pset_name: str
name: str
value: str
model_config = {"from_attributes": True}
class ElementOut(BaseModel):
id: UUID
global_id: str
ifc_type: str
name: str
description: str
storey: str
model_config = {"from_attributes": True}
class ElementDetailOut(ElementOut):
properties: list[PropertyOut] = []
class ProjectOut(BaseModel):
id: UUID
name: str
filename: str
description: str
ifc_schema: str
element_count: int = 0
model_config = {"from_attributes": True}