VatIdCheck
extends BaseEntity
in package
implements
IdentifiableInterface
uses
IdentifiableTrait
AbstractYes
One VAT id check (`cms_system_vat_id_checks`).
History table: every VIES call or manual verification is a new row, the latest row of a
country_code + vat_number pair wins. valid = null = VIES did not answer. source = manual
rows carry the evidence in note (also used as proof of a non-EU business, C1).
The engine reads and writes this table with raw DBAL (see VatIdCheckRepository); the entity exists for the admin grid and for ColumnLimits.
Attributes
- #[MappedSuperclass]
- #[TableAlias]
- $alias: 'vatIdCheck'
Table of Contents
Interfaces
- IdentifiableInterface
- Entity with a simple integer primary key. Most entities have one (often via {@see \App\Core\Traits\Shared\Models\Entities\IdentifiableTrait}); texts and links with a composite key do not, which is why `getId()` is not on {@see \App\Core\Base\BaseEntity}. Code that needs the id of a generic entity asks for this interface (parameter type, template bound, `instanceof`).
Properties
- $address : string|null
- $checkedAt : DateTime
- $checkedByUserId : int|null
- $countryCode : string
- $error : string|null
- $id : int|null
- $name : string|null
- $note : string|null
- $requestIdentifier : string|null
- $source : string
- $valid : bool|null
- $vatNumber : string
Methods
- __construct() : mixed
- callInitMethods() : void
- Calls `init{TraitName}()` for every used trait that defines such a method.
- getAddress() : string|null
- getAllTraits() : array<string, string>
- Returns all traits the class uses, including those used by parent classes and nested traits.
- getCheckedAt() : DateTime
- getCheckedByUserId() : int|null
- getCountryCode() : string
- getError() : string|null
- getId() : int|null
- getName() : string|null
- getNote() : string|null
- getRequestIdentifier() : string|null
- getSource() : string
- getValid() : bool|null
- getVatNumber() : string
- isPersisted() : bool
- setAddress() : $this
- setCheckedAt() : $this
- setCheckedByUserId() : $this
- setCountryCode() : $this
- setError() : $this
- setId() : $this
- setName() : $this
- setNote() : $this
- setRequestIdentifier() : $this
- setSource() : $this
- setValid() : $this
- setVatNumber() : $this
- getTraitsRecursive() : array<string, string>
- Walks the trait list recursively and collects nested traits too.
Properties
$address
protected
string|null
$address
= null
Attributes
- #[Column]
- $name: 'address'
- $type: 'string'
- $length: 255
- $nullable: true
$checkedAt
protected
DateTime
$checkedAt
= new DateTime()
Attributes
- #[Column]
- $name: 'checked_at'
- $type: 'datetime'
$checkedByUserId
protected
int|null
$checkedByUserId
= null
Attributes
- #[Column]
- $name: 'checked_by_user_id'
- $type: 'integer'
- $nullable: true
- $options: ['unsigned' => true]
$countryCode
protected
string
$countryCode
= ''
Attributes
- #[Column]
- $name: 'country_code'
- $type: 'string'
- $length: 2
- $options: ['fixed' => true]
$error
protected
string|null
$error
= null
Attributes
- #[Column]
- $name: 'error'
- $type: 'string'
- $length: 255
- $nullable: true
$id
protected
int|null
$id
= null
Attributes
- #[Column]
- $name: 'vat_id_check_id'
- $type: 'integer'
- $options: ['unsigned' => true]
- #[GeneratedValue]
- #[Id]
$name
protected
string|null
$name
= null
Attributes
- #[Column]
- $name: 'name'
- $type: 'string'
- $length: 255
- $nullable: true
$note
protected
string|null
$note
= null
Attributes
- #[Column]
- $name: 'note'
- $type: 'text'
- $nullable: true
$requestIdentifier
protected
string|null
$requestIdentifier
= null
Attributes
- #[Column]
- $name: 'request_identifier'
- $type: 'string'
- $length: 40
- $nullable: true
$source
protected
string
$source
= 'vies'
Attributes
- #[Column]
- $name: 'source'
- $type: 'string'
- $length: 10
$valid
protected
bool|null
$valid
= null
Attributes
- #[Column]
- $name: 'valid'
- $type: 'boolean'
- $nullable: true
$vatNumber
protected
string
$vatNumber
= ''
Attributes
- #[Column]
- $name: 'vat_number'
- $type: 'string'
- $length: 20
Methods
__construct()
public
__construct([int|null $id = null ][, string $countryCode = '' ][, string $vatNumber = '' ][, bool|null $valid = null ][, string|null $name = null ][, string|null $address = null ][, string|null $requestIdentifier = null ][, DateTime $checkedAt = new DateTime() ][, string $source = 'vies' ][, int|null $checkedByUserId = null ][, string|null $note = null ][, string|null $error = null ]) : mixed
Parameters
- $id : int|null = null
- $countryCode : string = ''
- $vatNumber : string = ''
- $valid : bool|null = null
- $name : string|null = null
- $address : string|null = null
- $requestIdentifier : string|null = null
- $checkedAt : DateTime = new DateTime()
- $source : string = 'vies'
- $checkedByUserId : int|null = null
- $note : string|null = null
- $error : string|null = null
callInitMethods()
Calls `init{TraitName}()` for every used trait that defines such a method.
public
callInitMethods() : void
getAddress()
public
getAddress() : string|null
Return values
string|nullgetAllTraits()
Returns all traits the class uses, including those used by parent classes and nested traits.
public
getAllTraits() : array<string, string>
Return values
array<string, string>getCheckedAt()
public
getCheckedAt() : DateTime
Return values
DateTimegetCheckedByUserId()
public
getCheckedByUserId() : int|null
Return values
int|nullgetCountryCode()
public
getCountryCode() : string
Return values
stringgetError()
public
getError() : string|null
Return values
string|nullgetId()
public
getId() : int|null
Return values
int|nullgetName()
public
getName() : string|null
Return values
string|nullgetNote()
public
getNote() : string|null
Return values
string|nullgetRequestIdentifier()
public
getRequestIdentifier() : string|null
Return values
string|nullgetSource()
public
getSource() : string
Return values
stringgetValid()
public
getValid() : bool|null
Return values
bool|nullgetVatNumber()
public
getVatNumber() : string
Return values
stringisPersisted()
public
isPersisted() : bool
Return values
boolsetAddress()
public
setAddress(string|null $address) : $this
Parameters
- $address : string|null
Return values
$thissetCheckedAt()
public
setCheckedAt(DateTime $checkedAt) : $this
Parameters
- $checkedAt : DateTime
Return values
$thissetCheckedByUserId()
public
setCheckedByUserId(int|null $checkedByUserId) : $this
Parameters
- $checkedByUserId : int|null
Return values
$thissetCountryCode()
public
setCountryCode(string $countryCode) : $this
Parameters
- $countryCode : string
Return values
$thissetError()
public
setError(string|null $error) : $this
Parameters
- $error : string|null
Return values
$thissetId()
public
setId(int|null $id) : $this
Parameters
- $id : int|null
Return values
$thissetName()
public
setName(string|null $name) : $this
Parameters
- $name : string|null
Return values
$thissetNote()
public
setNote(string|null $note) : $this
Parameters
- $note : string|null
Return values
$thissetRequestIdentifier()
public
setRequestIdentifier(string|null $requestIdentifier) : $this
Parameters
- $requestIdentifier : string|null
Return values
$thissetSource()
public
setSource(string $source) : $this
Parameters
- $source : string
Return values
$thissetValid()
public
setValid(bool|null $valid) : $this
Parameters
- $valid : bool|null
Return values
$thissetVatNumber()
public
setVatNumber(string $vatNumber) : $this
Parameters
- $vatNumber : string
Return values
$thisgetTraitsRecursive()
Walks the trait list recursively and collects nested traits too.
private
static getTraitsRecursive(array<string, string> $traits) : array<string, string>
Parameters
- $traits : array<string, string>