src/Entity/Logs/Vies.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Logs;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5.  * @ORM\Table(name="vies")
  6.  *
  7.  * @ORM\Entity(repositoryClass="App\Repository\Logs\ViesRepository")
  8.  */
  9. class Vies
  10. {
  11.     /**
  12.      * @ORM\Id
  13.      *
  14.      * @ORM\GeneratedValue(strategy="AUTO")
  15.      *
  16.      * @ORM\Column(type="integer", name="id")
  17.      */
  18.     private int $id;
  19.     /**
  20.      * @ORM\Column(type="integer", name="customer_id")
  21.      */
  22.     private int $customerId;
  23.     /**
  24.      * @ORM\Column(type="string", name="vat_number", length=64)
  25.      */
  26.     private string $vatNumber;
  27.     /**
  28.      * @ORM\Column(type="string", name="iso_code", length=2)
  29.      */
  30.     private string $isoCode;
  31.     /**
  32.      * @ORM\Column(type="boolean", name="is_valid")
  33.      */
  34.     private bool $isValid;
  35.     /**
  36.      * @ORM\Column(type="string", name="response", length=1024)
  37.      */
  38.     private string $response;
  39.     /**
  40.      * @var \DateTime
  41.      *
  42.      * @ORM\Column(name="date_add", type="datetime")
  43.      */
  44.     private \DateTime $dateAdd;
  45.     public static function createFromArguments(string $vatNumberint $customerIdstring $isoCodestring $responsebool $isValid): Vies
  46.     {
  47.         $vies = new self();
  48.         $vies->vatNumber $vatNumber;
  49.         $vies->customerId $customerId;
  50.         $vies->isoCode $isoCode;
  51.         $vies->response $response;
  52.         $vies->isValid $isValid;
  53.         $vies->dateAdd = new \DateTime();
  54.         return $vies;
  55.     }
  56.     public function updateResponse(string $responsebool $isValid): Vies
  57.     {
  58.         $this->response $response;
  59.         $this->isValid $isValid;
  60.         return $this;
  61.     }
  62.     /**
  63.      * @return int
  64.      */
  65.     public function getId(): int
  66.     {
  67.         return $this->id;
  68.     }
  69.     public function getVatNumber(): string
  70.     {
  71.         return $this->vatNumber;
  72.     }
  73.     public function getIsoCode(): string
  74.     {
  75.         return $this->isoCode;
  76.     }
  77.     public function isValid(): bool
  78.     {
  79.         return $this->isValid;
  80.     }
  81.     public function getResponse(): string
  82.     {
  83.         return $this->response;
  84.     }
  85.     public function getDateAdd(): \DateTime
  86.     {
  87.         return $this->dateAdd;
  88.     }
  89.     public function getCustomerId(): int
  90.     {
  91.         return $this->customerId;
  92.     }
  93. }