from app.models.module import Module
from app.models.tenant import Tenant
from app.models.tenant_module import TenantModule
from app.models.user import User
from app.models.venue import Venue


MOCK_TENANT = Tenant(
    id="tenant_demo_hospitality",
    name="Demo Hospitality Group",
    slug="demo-hospitality",
    created_at="2026-03-30T00:00:00Z",
)

MOCK_VENUES = [
    Venue(
        id="venue_vip_club",
        tenant_id="tenant_demo_hospitality",
        name="VIP CLUB",
        address="Via Roma 1, Italia",
        created_at="2026-03-30T00:00:00Z",
    )
]

MOCK_USERS = [
    User(
        id="user_admin_demo",
        tenant_id="tenant_demo_hospitality",
        email="owner@demo-hospitality.local",
        role="owner",
        created_at="2026-03-30T00:00:00Z",
    ),
    User(
        id="user_manager_demo",
        tenant_id="tenant_demo_hospitality",
        email="manager@demo-hospitality.local",
        role="manager",
        created_at="2026-03-30T00:00:00Z",
    ),
]

MODULE_CATALOG = [
    Module(
        key="prenotazioni",
        name="Prenotazioni",
        description="Gestione prenotazioni, tavoli, sale e assegnazione operativa.",
        status="active",
        kind="legacy",
        route_path="/modules/prenotazioni",
        short_description="Modulo legacy full-stack integrato tramite launcher dedicato.",
        stack_summary="Next.js 14, React 18, FastAPI, SQLAlchemy, PostgreSQL",
        future_integration_state="Assorbimento graduale nel core tramite API hub.",
        source_path="PRENOTAZIONI_IA",
        preview_mode="link",
        technical_notes=[
            "Legacy preservata senza refactor interni.",
            "Frontend e backend restano servizi dedicati.",
            "Il backend hub non sostituisce ancora le sue API native.",
        ],
    ),
    Module(
        key="menu",
        name="Menu",
        description="Assistente menu e carta vini con interfaccia web leggera.",
        status="active",
        kind="legacy",
        route_path="/modules/menu",
        short_description="Modulo legacy statico servito da container dedicato.",
        stack_summary="HTML, CSS, JavaScript, Nginx",
        future_integration_state="Futuro allineamento al client LLM condiviso.",
        source_path="MENU2.0",
        preview_mode="iframe",
        technical_notes=[
            "Legacy preservata senza modifiche di logica interna.",
            "Configurazione LLM ancora interna al modulo.",
            "Wrapper Docker dedicato per pubblicazione statica.",
        ],
    ),
    Module(
        key="ordini",
        name="Ordini",
        description="Gestione catalogo prodotti, ordini sospesi e storico fornitori.",
        status="active",
        kind="platform",
        route_path="/modules/ordini",
        short_description="Modulo nativo con persistenza SQL e launcher dedicato.",
        stack_summary="HTML, CSS, JavaScript, Nginx, FastAPI, SQLAlchemy, PostgreSQL",
        future_integration_state="Pronto per tenancy, ruoli e workflow piu avanzati.",
        source_path="apps/ordini",
        preview_mode="link",
        technical_notes=[
            "Catalogo prodotti, storico e note sono persistiti su SQL.",
            "Ordini sospesi e confermati restano accessibili lato server.",
            "Il modulo replica il flusso operativo dell'esempio esterno senza dipendere da CSV come storage.",
        ],
    ),
    Module(
        key="homemade",
        name="Libro Homemade",
        description="Modulo futuro per ricette, basi e know-how interno del locale.",
        status="inactive",
        kind="platform",
        route_path="/modules/homemade",
        short_description="Placeholder per il futuro libro homemade.",
        stack_summary="Da definire nel core platform",
        future_integration_state="Nuovo modulo nativo.",
        source_path=None,
        preview_mode="none",
        technical_notes=[
            "Nessuna business logic implementata.",
            "Predisposto per contenuti tenant-aware e ricerca futura.",
        ],
    ),
]

TENANT_MODULES = [
    TenantModule(
        id="tm_prenotazioni_demo",
        tenant_id="tenant_demo_hospitality",
        module_key="prenotazioni",
        enabled=True,
        plan_name="Legacy Pilot",
        activated_at="2026-03-30T00:00:00Z",
        expires_at=None,
    ),
    TenantModule(
        id="tm_menu_demo",
        tenant_id="tenant_demo_hospitality",
        module_key="menu",
        enabled=True,
        plan_name="Legacy Pilot",
        activated_at="2026-03-30T00:00:00Z",
        expires_at=None,
    ),
    TenantModule(
        id="tm_ordini_demo",
        tenant_id="tenant_demo_hospitality",
        module_key="ordini",
        enabled=True,
        plan_name="Platform Active",
        activated_at="2026-04-01T00:00:00Z",
        expires_at=None,
    ),
    TenantModule(
        id="tm_homemade_demo",
        tenant_id="tenant_demo_hospitality",
        module_key="homemade",
        enabled=False,
        plan_name="Planned",
        activated_at=None,
        expires_at=None,
    ),
]
