
    `j4                        d Z ddlmZ ddlmZmZ ddlmZ  ed       G d d             Z ed       G d	 d
             Z	 ed       G d d             Z
 ed       G d d             Zy)u   Typed payload models for Ross1000 daily movement XML generation.

All payloads are frozen dataclasses — immutable, hashable, and safe to
pass across service boundaries without defensive copying.
    )annotations)	dataclassfield)dateT)frozenc                  D    e Zd ZU dZded<   ded<   ded<   ded<   ded<   y	)
Ross1000StrutturaPayloadas  Structure capacity block required on every movement day.

    Attributes:
        codice:              ISTAT structure code (e.g. "058091-CAV-00001")
        apertura:            1 = open, 0 = closed
        camere_occupate:     Number of occupied rooms on this day
        camere_disponibili:  Total available rooms
        letti_disponibili:   Total available beds
    strcodiceintaperturacamere_occupatecamere_disponibililetti_disponibiliN__name__
__module____qualname____doc____annotations__     2/backend/istat/ross1000/models/movement_payload.pyr	   r	      s%     KMr   r	   c                      e Zd ZU dZded<   ded<   ded<   ded<   ded<   ded<   ded	<   ded
<   dZded<   dZded<   dZded<   y)Ross1000GuestPayloadu  Single guest record for a Ross1000 arrival or departure block.

    Mandatory fields (always present in XML output):
        idswh:           Permanent regulatory identity token (from GuestStay)
        cognome:         Surname (uppercase)
        nome:            Given name (uppercase)
        sesso:           Gender code — "M" (male) or "F" (female)
        datanascita:     Date of birth in AAAAMMGG format (e.g. "19830209")
        cittadinanza:    9-digit ISTAT country code for citizenship/nationality
        statoresidenza:  9-digit ISTAT country code for country of residence
        statonascita:    9-digit ISTAT country code for country of birth

    Optional fields (omitted from XML when empty/None):
        comune_residenza:   ISTAT municipality code for residence (Italian guests)
        provincia_residenza: Italian province code for residence (2 chars)
        comune_nascita:     ISTAT municipality code for place of birth
    r
   idswhcognomenomesessodatanascitacittadinanzastatoresidenzastatonascitaNz
str | Nonecomune_residenzaprovincia_residenzacomune_nascita)r   r   r   r   r   r$   r%   r&   r   r   r   r   r       sW    & JL
IJ $(j'&**!%NJ%r   r   c                  ^    e Zd ZU dZded<   ded<    ee      Zded<    ee      Zded<   y	)
Ross1000MovementDayPayloada  All movement data for a single calendar day.

    One of these is generated for every day in the export range,
    including days with no guest activity (empty arrivals/departures).

    Attributes:
        date:       The calendar day this block represents
        struttura:  Structure capacity block (always present)
        arrivi:     Guests arriving on this day (may be empty)
        partenze:   Guests departing on this day (may be empty)
    r   r	   	struttura)default_factoryz tuple[Ross1000GuestPayload, ...]arrivipartenzeN)	r   r   r   r   r   r   tupler+   r,   r   r   r   r(   r(   D   s4    
 J''/4U/KF,K16u1MH.Mr   r(   c                  D    e Zd ZU dZded<   ded<   ded<   ded<   ded<   y	)
Ross1000ExportResulta4  Complete export result for a date range.

    Attributes:
        filename:    Suggested download filename
        content:     UTF-8 XML string (plain XML or SOAP envelope)
        content_type: MIME type
        day_count:   Number of movement day blocks generated
        mode:        "xml" or "soap"
    r
   filenamecontentcontent_typer   	day_countmodeNr   r   r   r   r/   r/   X   s#     MLN
Ir   r/   N)r   
__future__r   dataclassesr   r   datetimer   r	   r   r(   r/   r   r   r   <module>r8      s    # (  $  $ $ &  &  &F $N N N& $  r   