src/Cms/TenantBundle/Entity/TenantedEntities/AnonymousTenantedEntity.php line 21

Open in your IDE?
  1. <?php
  2. namespace Cms\TenantBundle\Entity\TenantedEntities;
  3. use Cms\TenantBundle\Entity\TenantedEntity;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * This type is used for tables that have their own PKID generation.
  7.  * These objects DO NOT use the globally unique identification scheme.
  8.  * This is useful for features that have large tables but do not need identification.
  9.  * For example, the bandwidth, storage, and other resource usages.
  10.  * In these kinds of scenarios, we need an ID to designate the record.
  11.  * However, the user never really interacts with single records.
  12.  *
  13.  * Class AnonymousTenantedEntity
  14.  * @package Cms\TenantBundle\Entity\TenantedEntities
  15.  *
  16.  * @ORM\MappedSuperclass
  17.  */
  18. abstract class AnonymousTenantedEntity extends TenantedEntity
  19. {
  20.     /**
  21.      * @var int
  22.      *
  23.      * @ORM\Column(
  24.      *     type = "integer",
  25.      *     options = {
  26.      *         "unsigned" = true
  27.      *     }
  28.      * )
  29.      * @ORM\Id
  30.      * @ORM\GeneratedValue(
  31.      *     strategy = "AUTO"
  32.      * )
  33.      */
  34.     protected $id;
  35.     /**
  36.      * @var int
  37.      *
  38.      * @ORM\Column(
  39.      *     type = "string",
  40.      *     nullable = true,
  41.      *     unique = false
  42.      * )
  43.      */
  44.     protected $uid;
  45.     /**
  46.      * @return int
  47.      */
  48.     public function getId()
  49.     {
  50.         return $this->id;
  51.     }
  52. }