Files
Claude Agent e21cf03a16 feat: add multi-tenant system with properties, organizations, and public booking
Implement complete multi-property architecture:
- Properties (groups of spaces) with public/private visibility
- Property managers (many-to-many) with role-based permissions
- Organizations with member management
- Anonymous/guest booking support via public API (/api/public/*)
- Property-scoped spaces, bookings, and settings
- Frontend: property selector, organization management, public booking views
- Migration script and updated seed data

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 00:17:21 +00:00

51 lines
1.2 KiB
Python

"""Space schemas for request/response."""
from pydantic import BaseModel, Field
class SpaceBase(BaseModel):
"""Base space schema."""
name: str = Field(..., min_length=1)
type: str = Field(..., pattern="^(sala|birou)$")
capacity: int = Field(..., gt=0)
description: str | None = None
# Per-space scheduling settings (None = use global default)
working_hours_start: int | None = None
working_hours_end: int | None = None
min_duration_minutes: int | None = None
max_duration_minutes: int | None = None
class SpaceCreate(SpaceBase):
"""Space creation schema."""
property_id: int | None = None
class SpaceUpdate(SpaceBase):
"""Space update schema."""
pass
class SpaceStatusUpdate(BaseModel):
"""Space status update schema."""
is_active: bool
class SpaceResponse(SpaceBase):
"""Space response schema."""
id: int
is_active: bool
property_id: int | None = None
property_name: str | None = None
working_hours_start: int | None = None
working_hours_end: int | None = None
min_duration_minutes: int | None = None
max_duration_minutes: int | None = None
model_config = {"from_attributes": True}