<?php
namespace App\Entity\Logs;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Table(name="vies")
*
* @ORM\Entity(repositoryClass="App\Repository\Logs\ViesRepository")
*/
class Vies
{
/**
* @ORM\Id
*
* @ORM\GeneratedValue(strategy="AUTO")
*
* @ORM\Column(type="integer", name="id")
*/
private int $id;
/**
* @ORM\Column(type="integer", name="customer_id")
*/
private int $customerId;
/**
* @ORM\Column(type="string", name="vat_number", length=64)
*/
private string $vatNumber;
/**
* @ORM\Column(type="string", name="iso_code", length=2)
*/
private string $isoCode;
/**
* @ORM\Column(type="boolean", name="is_valid")
*/
private bool $isValid;
/**
* @ORM\Column(type="string", name="response", length=1024)
*/
private string $response;
/**
* @var \DateTime
*
* @ORM\Column(name="date_add", type="datetime")
*/
private \DateTime $dateAdd;
public static function createFromArguments(string $vatNumber, int $customerId, string $isoCode, string $response, bool $isValid): Vies
{
$vies = new self();
$vies->vatNumber = $vatNumber;
$vies->customerId = $customerId;
$vies->isoCode = $isoCode;
$vies->response = $response;
$vies->isValid = $isValid;
$vies->dateAdd = new \DateTime();
return $vies;
}
public function updateResponse(string $response, bool $isValid): Vies
{
$this->response = $response;
$this->isValid = $isValid;
return $this;
}
/**
* @return int
*/
public function getId(): int
{
return $this->id;
}
public function getVatNumber(): string
{
return $this->vatNumber;
}
public function getIsoCode(): string
{
return $this->isoCode;
}
public function isValid(): bool
{
return $this->isValid;
}
public function getResponse(): string
{
return $this->response;
}
public function getDateAdd(): \DateTime
{
return $this->dateAdd;
}
public function getCustomerId(): int
{
return $this->customerId;
}
}