- Add timezone configuration per space with fallback to system default - Implement timezone-aware datetime display and editing across frontend - Add migration for per_space_settings table - Update booking service to handle timezone conversions properly - Improve .gitignore to exclude build artifacts - Add comprehensive testing documentation Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
24 lines
835 B
Python
24 lines
835 B
Python
"""Space model."""
|
|
from sqlalchemy import Boolean, Column, Integer, String
|
|
|
|
from app.db.session import Base
|
|
|
|
|
|
class Space(Base):
|
|
"""Space model for offices and meeting rooms."""
|
|
|
|
__tablename__ = "spaces"
|
|
|
|
id = Column(Integer, primary_key=True, index=True)
|
|
name = Column(String, nullable=False, index=True)
|
|
type = Column(String, nullable=False) # "sala" or "birou"
|
|
capacity = Column(Integer, nullable=False)
|
|
description = Column(String, nullable=True)
|
|
is_active = Column(Boolean, default=True, nullable=False)
|
|
|
|
# Per-space scheduling settings (NULL = use global default)
|
|
working_hours_start = Column(Integer, nullable=True)
|
|
working_hours_end = Column(Integer, nullable=True)
|
|
min_duration_minutes = Column(Integer, nullable=True)
|
|
max_duration_minutes = Column(Integer, nullable=True)
|