"""
Pydantic schemas for review-related requests and responses.
"""
from pydantic import BaseModel, Field
from typing import Optional


class CreateReviewRequest(BaseModel):
    """Schema for creating a review."""
    room_id: int = Field(..., gt=0, description="Room ID")
    rating: int = Field(..., ge=1, le=5, description="Rating from 1 to 5")
    comment: str = Field(..., min_length=1, max_length=2000, description="Review comment")
    
    model_config = {
        "json_schema_extra": {
            "example": {
                "room_id": 1,
                "rating": 5,
                "comment": "Great room, excellent service!"
            }
        }
    }

