Skip to content

Commit

Permalink
Fattura Models
Browse files Browse the repository at this point in the history
  • Loading branch information
turbo124 committed May 16, 2024
1 parent 4a842e6 commit 80b7776
Show file tree
Hide file tree
Showing 88 changed files with 2,629 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/src/Standards/* export-ignore
.git* export-ignore
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/vendor/
/src/Standards/ export-ignore
16 changes: 16 additions & 0 deletions src/Models/FatturaPA/Allegati.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php

namespace Invoiceninja\Einvoice\Models\FatturaPA;

use Carbon\Carbon;
use Spatie\LaravelData\Data;
use Spatie\LaravelData\Optional;

class Allegati extends Data
{
public string $NomeAttachment;
public string|Optional $AlgoritmoCompressione;
public string|Optional $FormatoAttachment;
public string|Optional $DescrizioneAttachment;
public mixed $Attachment;
}
34 changes: 34 additions & 0 deletions src/Models/FatturaPA/AllegatiType/Allegati.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?php

namespace Invoiceninja\Einvoice\Models\FatturaPA\AllegatiType;

use Carbon\Carbon;
use Spatie\LaravelData\Attributes\Validation\Max;
use Spatie\LaravelData\Attributes\Validation\Min;
use Spatie\LaravelData\Attributes\Validation\Regex;
use Spatie\LaravelData\Data;
use Spatie\LaravelData\Optional;

class Allegati extends Data
{
#[Max(60)]
#[Min(1)]
#[Regex('[\p{IsBasicLatin}\p{IsLatin-1Supplement}]{1,60}')]
public string $NomeAttachment;

#[Max(10)]
#[Min(1)]
#[Regex('(\p{IsBasicLatin}{1,10})')]
public string|Optional $AlgoritmoCompressione;

#[Max(10)]
#[Min(1)]
#[Regex('(\p{IsBasicLatin}{1,10})')]
public string|Optional $FormatoAttachment;

#[Max(100)]
#[Min(1)]
#[Regex('[\p{IsBasicLatin}\p{IsLatin-1Supplement}]{1,100}')]
public string|Optional $DescrizioneAttachment;
public mixed $Attachment;
}
15 changes: 15 additions & 0 deletions src/Models/FatturaPA/AltriDatiGestionali.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php

namespace Invoiceninja\Einvoice\Models\FatturaPA;

use Carbon\Carbon;
use Spatie\LaravelData\Data;
use Spatie\LaravelData\Optional;

class AltriDatiGestionali extends Data
{
public string $TipoDato;
public string|Optional $RiferimentoTesto;
public float|Optional $RiferimentoNumero;
public Carbon|Optional $RiferimentoData;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?php

namespace Invoiceninja\Einvoice\Models\FatturaPA\AltriDatiGestionaliType;

use Carbon\Carbon;
use Spatie\LaravelData\Attributes\Validation\Max;
use Spatie\LaravelData\Attributes\Validation\Min;
use Spatie\LaravelData\Attributes\Validation\Regex;
use Spatie\LaravelData\Attributes\WithTransformer;
use Spatie\LaravelData\Data;
use Spatie\LaravelData\Optional;
use Spatie\LaravelData\Transformers\DateTimeInterfaceTransformer;

class AltriDatiGestionali extends Data
{
#[Max(10)]
#[Min(1)]
#[Regex('(\p{IsBasicLatin}{1,10})')]
public string $TipoDato;

#[Max(60)]
#[Min(1)]
#[Regex('[\p{IsBasicLatin}\p{IsLatin-1Supplement}]{1,60}')]
public string|Optional $RiferimentoTesto;

#[Regex('[\-]?[0-9]{1,11}\.[0-9]{2,8}')]
public float|Optional $RiferimentoNumero;

#[WithTransformer('Spatie\LaravelData\Transformers\DateTimeInterfaceTransformer', format: 'Y-m-d')]
public Carbon|Optional $RiferimentoData;
}
16 changes: 16 additions & 0 deletions src/Models/FatturaPA/Anagrafica.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php

namespace Invoiceninja\Einvoice\Models\FatturaPA;

use Carbon\Carbon;
use Spatie\LaravelData\Data;
use Spatie\LaravelData\Optional;

class Anagrafica extends Data
{
public string $Denominazione;
public string $Nome;
public string $Cognome;
public string|Optional $Titolo;
public string|Optional $CodEORI;
}
34 changes: 34 additions & 0 deletions src/Models/FatturaPA/AnagraficaType/Anagrafica.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?php

namespace Invoiceninja\Einvoice\Models\FatturaPA\AnagraficaType;

use Carbon\Carbon;
use Spatie\LaravelData\Attributes\Validation\Max;
use Spatie\LaravelData\Attributes\Validation\Min;
use Spatie\LaravelData\Attributes\Validation\Regex;
use Spatie\LaravelData\Data;
use Spatie\LaravelData\Optional;

class Anagrafica extends Data
{
#[Max(80)]
#[Min(1)]
#[Regex('[\p{IsBasicLatin}\p{IsLatin-1Supplement}]{1,80}')]
public string $Denominazione;

#[Max(60)]
#[Min(1)]
#[Regex('[\p{IsBasicLatin}\p{IsLatin-1Supplement}]{1,60}')]
public string $Nome;

#[Max(60)]
#[Min(1)]
#[Regex('[\p{IsBasicLatin}\p{IsLatin-1Supplement}]{1,60}')]
public string $Cognome;

#[Max(10)]
#[Min(2)]
#[Regex('(\p{IsBasicLatin}{2,10})')]
public string|Optional $Titolo;
public string|Optional $CodEORI;
}
22 changes: 22 additions & 0 deletions src/Models/FatturaPA/CedentePrestatore.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php

namespace Invoiceninja\Einvoice\Models\FatturaPA;

use Carbon\Carbon;
use Invoiceninja\Einvoice\Models\FatturaPA\ContattiType\Contatti;
use Invoiceninja\Einvoice\Models\FatturaPA\DatiAnagraficiCedenteType\DatiAnagrafici;
use Invoiceninja\Einvoice\Models\FatturaPA\IndirizzoType\Sede;
use Invoiceninja\Einvoice\Models\FatturaPA\IndirizzoType\StabileOrganizzazione;
use Invoiceninja\Einvoice\Models\FatturaPA\IscrizioneREAType\IscrizioneREA;
use Spatie\LaravelData\Data;
use Spatie\LaravelData\Optional;

class CedentePrestatore extends Data
{
public DatiAnagrafici $DatiAnagrafici;
public Sede $Sede;
public StabileOrganizzazione|Optional $StabileOrganizzazione;
public IscrizioneREA|Optional $IscrizioneREA;
public Contatti|Optional $Contatti;
public string|Optional $RiferimentoAmministrazione;
}
29 changes: 29 additions & 0 deletions src/Models/FatturaPA/CedentePrestatoreType/CedentePrestatore.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?php

namespace Invoiceninja\Einvoice\Models\FatturaPA\CedentePrestatoreType;

use Carbon\Carbon;
use Invoiceninja\Einvoice\Models\FatturaPA\ContattiType\Contatti;
use Invoiceninja\Einvoice\Models\FatturaPA\DatiAnagraficiCedenteType\DatiAnagrafici;
use Invoiceninja\Einvoice\Models\FatturaPA\IndirizzoType\Sede;
use Invoiceninja\Einvoice\Models\FatturaPA\IndirizzoType\StabileOrganizzazione;
use Invoiceninja\Einvoice\Models\FatturaPA\IscrizioneREAType\IscrizioneREA;
use Spatie\LaravelData\Attributes\Validation\Max;
use Spatie\LaravelData\Attributes\Validation\Min;
use Spatie\LaravelData\Attributes\Validation\Regex;
use Spatie\LaravelData\Data;
use Spatie\LaravelData\Optional;

class CedentePrestatore extends Data
{
public DatiAnagrafici $DatiAnagrafici;
public Sede $Sede;
public StabileOrganizzazione|Optional $StabileOrganizzazione;
public IscrizioneREA|Optional $IscrizioneREA;
public Contatti|Optional $Contatti;

#[Max(20)]
#[Min(1)]
#[Regex('(\p{IsBasicLatin}{1,20})')]
public string|Optional $RiferimentoAmministrazione;
}
19 changes: 19 additions & 0 deletions src/Models/FatturaPA/CessionarioCommittente.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php

namespace Invoiceninja\Einvoice\Models\FatturaPA;

use Carbon\Carbon;
use Invoiceninja\Einvoice\Models\FatturaPA\DatiAnagraficiCessionarioType\DatiAnagrafici;
use Invoiceninja\Einvoice\Models\FatturaPA\IndirizzoType\Sede;
use Invoiceninja\Einvoice\Models\FatturaPA\IndirizzoType\StabileOrganizzazione;
use Invoiceninja\Einvoice\Models\FatturaPA\RappresentanteFiscaleCessionarioType\RappresentanteFiscale;
use Spatie\LaravelData\Data;
use Spatie\LaravelData\Optional;

class CessionarioCommittente extends Data
{
public DatiAnagrafici $DatiAnagrafici;
public Sede $Sede;
public StabileOrganizzazione|Optional $StabileOrganizzazione;
public RappresentanteFiscale|Optional $RappresentanteFiscale;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php

namespace Invoiceninja\Einvoice\Models\FatturaPA\CessionarioCommittenteType;

use Carbon\Carbon;
use Invoiceninja\Einvoice\Models\FatturaPA\DatiAnagraficiCessionarioType\DatiAnagrafici;
use Invoiceninja\Einvoice\Models\FatturaPA\IndirizzoType\Sede;
use Invoiceninja\Einvoice\Models\FatturaPA\IndirizzoType\StabileOrganizzazione;
use Invoiceninja\Einvoice\Models\FatturaPA\RappresentanteFiscaleCessionarioType\RappresentanteFiscale;
use Spatie\LaravelData\Data;
use Spatie\LaravelData\Optional;

class CessionarioCommittente extends Data
{
public DatiAnagrafici $DatiAnagrafici;
public Sede $Sede;
public StabileOrganizzazione|Optional $StabileOrganizzazione;
public RappresentanteFiscale|Optional $RappresentanteFiscale;
}
12 changes: 12 additions & 0 deletions src/Models/FatturaPA/CodiceArticolo.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php

namespace Invoiceninja\Einvoice\Models\FatturaPA;

use Carbon\Carbon;
use Spatie\LaravelData\Data;

class CodiceArticolo extends Data
{
public string $CodiceTipo;
public string $CodiceValore;
}
19 changes: 19 additions & 0 deletions src/Models/FatturaPA/CodiceArticoloType/CodiceArticolo.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php

namespace Invoiceninja\Einvoice\Models\FatturaPA\CodiceArticoloType;

use Carbon\Carbon;
use Spatie\LaravelData\Attributes\Validation\Max;
use Spatie\LaravelData\Attributes\Validation\Min;
use Spatie\LaravelData\Attributes\Validation\Regex;
use Spatie\LaravelData\Data;
use Spatie\LaravelData\Optional;

class CodiceArticolo extends Data
{
#[Max(35)]
#[Min(1)]
#[Regex('(\p{IsBasicLatin}{1,35})')]
public string $CodiceTipo;
public string $CodiceValore;
}
14 changes: 14 additions & 0 deletions src/Models/FatturaPA/Contatti.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?php

namespace Invoiceninja\Einvoice\Models\FatturaPA;

use Carbon\Carbon;
use Spatie\LaravelData\Data;
use Spatie\LaravelData\Optional;

class Contatti extends Data
{
public string|Optional $Telefono;
public string|Optional $Fax;
public string|Optional $Email;
}
13 changes: 13 additions & 0 deletions src/Models/FatturaPA/ContattiTrasmittente.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

namespace Invoiceninja\Einvoice\Models\FatturaPA;

use Carbon\Carbon;
use Spatie\LaravelData\Data;
use Spatie\LaravelData\Optional;

class ContattiTrasmittente extends Data
{
public string|Optional $Telefono;
public string|Optional $Email;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?php

namespace Invoiceninja\Einvoice\Models\FatturaPA\ContattiTrasmittenteType;

use Carbon\Carbon;
use Spatie\LaravelData\Attributes\Validation\Max;
use Spatie\LaravelData\Attributes\Validation\Min;
use Spatie\LaravelData\Attributes\Validation\Regex;
use Spatie\LaravelData\Data;
use Spatie\LaravelData\Optional;

class ContattiTrasmittente extends Data
{
#[Max(12)]
#[Min(5)]
#[Regex('(\p{IsBasicLatin}{5,12})')]
public string|Optional $Telefono;

#[Regex('.+@.+[.]+.+')]
public string|Optional $Email;
}
26 changes: 26 additions & 0 deletions src/Models/FatturaPA/ContattiType/Contatti.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?php

namespace Invoiceninja\Einvoice\Models\FatturaPA\ContattiType;

use Carbon\Carbon;
use Spatie\LaravelData\Attributes\Validation\Max;
use Spatie\LaravelData\Attributes\Validation\Min;
use Spatie\LaravelData\Attributes\Validation\Regex;
use Spatie\LaravelData\Data;
use Spatie\LaravelData\Optional;

class Contatti extends Data
{
#[Max(12)]
#[Min(5)]
#[Regex('(\p{IsBasicLatin}{5,12})')]
public string|Optional $Telefono;

#[Max(12)]
#[Min(5)]
#[Regex('(\p{IsBasicLatin}{5,12})')]
public string|Optional $Fax;

#[Regex('.+@.+[.]+.+')]
public string|Optional $Email;
}
Loading

0 comments on commit 80b7776

Please sign in to comment.