classes/XLite/Model/EntityTypeVersion.php line 18

Open in your IDE?
  1. <?php
  2. /**
  3.  * Copyright (c) 2011-present Qualiteam software Ltd. All rights reserved.
  4.  * See https://www.x-cart.com/license-agreement.html for license details.
  5.  */
  6. namespace XLite\Model;
  7. use Doctrine\ORM\Mapping as ORM;
  8. /**
  9.  * Entity type version is a UUID that changes every time an entity of the given type is persisted/updated/removed
  10.  *
  11.  * @ORM\Entity (repositoryClass="XLite\Model\Repo\EntityTypeVersion")
  12.  * @ORM\Table (name="entity_type_versions")
  13.  */
  14. class EntityTypeVersion
  15. {
  16.     /**
  17.      * Primary key
  18.      *
  19.      * @var integer
  20.      *
  21.      * @ORM\Id
  22.      * @ORM\GeneratedValue (strategy="AUTO")
  23.      * @ORM\Column         (type="integer")
  24.      */
  25.     protected $id;
  26.     /**
  27.      * Entity FQCN
  28.      *
  29.      * @var string
  30.      *
  31.      * @ORM\Column (type="string", length=255, unique=true)
  32.      */
  33.     protected $entityType;
  34.     /**
  35.      * Entity type version
  36.      *
  37.      * @var string
  38.      *
  39.      * @ORM\Column (type="guid")
  40.      */
  41.     protected $version;
  42.     public function __construct($entityType$version)
  43.     {
  44.         $this->entityType $entityType;
  45.         $this->version    $version;
  46.     }
  47. }