"""DTOs para el módulo de invitaciones."""

from datetime import datetime
from typing import Optional

from pydantic import BaseModel, EmailStr


class CreateInviteDTO(BaseModel):
    email: EmailStr
    company_id: int
    role_id: int


class InviteResponseDTO(BaseModel):
    id: int
    email: str
    role: str
    expires_at: datetime
    invite_url: str
    created_at: datetime

    class Config:
        from_attributes = True


class InviteValidationResult(BaseModel):
    email: str
    role: str
    invite_id: int
    tenant_slug: str
    company_id: Optional[int] = None
