src/Entity/Trace.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Gedmo\Mapping\Annotation as Gedmo;
  5. /**
  6.  * Track
  7.  *
  8.  * @ORM\Table(name="trace")
  9.  * @ORM\Entity(repositoryClass="App\Repository\TraceRepository")
  10.  */
  11. class Trace
  12. {
  13.     /**
  14.      * @var int
  15.      *
  16.      * @ORM\Column(name="id", type="integer")
  17.      * @ORM\Id
  18.      * @ORM\GeneratedValue(strategy="AUTO")
  19.      */
  20.     private $id;
  21.     /**
  22.      * @var string|null
  23.      *
  24.      * @ORM\Column(name="type", type="string", length=255, nullable=false)
  25.      */
  26.     private $type;
  27.     /**
  28.      * @var int|null
  29.      *
  30.      * @ORM\Column(name="authorId", type="integer", nullable=true)
  31.      */
  32.     private $authorId;
  33.     /**
  34.      * @var string|null
  35.      *
  36.      * @ORM\Column(name="authorClass", type="string", length=255, nullable=true)
  37.      */
  38.     private $authorClass;
  39.     /**
  40.      * @var int|null
  41.      *
  42.      * @ORM\Column(name="subjectId", type="integer", nullable=true)
  43.      */
  44.     private $subjectId;
  45.     /**
  46.      * @var string|null
  47.      *
  48.      * @ORM\Column(name="subjectClass", type="string", length=255, nullable=true)
  49.      */
  50.     private $subjectClass;
  51.     /**
  52.      * @var array|null
  53.      *
  54.      * @ORM\Column(name="details", type="array", nullable=true)
  55.      */
  56.     private $details;
  57.     /**
  58.      * @var \DateTime
  59.      * @Gedmo\Timestampable(on="create")
  60.      * @ORM\Column(name="created", type="datetime")
  61.      */
  62.     private $created;
  63.     /**
  64.      * @var string|null
  65.      *
  66.      * @ORM\Column(name="ip", type="string", length=255, nullable=true)
  67.      */
  68.     private $ip;
  69.     /**
  70.      * @ORM\ManyToOne(targetEntity="App\Entity\User")
  71.      * @ORM\JoinColumn(name="impersonator_user_id", referencedColumnName="id")
  72.      */
  73.     public $impersonator;
  74.     /**
  75.      * Get id.
  76.      *
  77.      * @return int
  78.      */
  79.     public function getId()
  80.     {
  81.         return $this->id;
  82.     }
  83.     /**
  84.      * Set authorId.
  85.      *
  86.      * @param int|null $authorId
  87.      *
  88.      * @return Trace
  89.      */
  90.     public function setAuthorId($authorId null)
  91.     {
  92.         $this->authorId $authorId;
  93.         return $this;
  94.     }
  95.     /**
  96.      * Get authorId.
  97.      *
  98.      * @return int|null
  99.      */
  100.     public function getAuthorId()
  101.     {
  102.         return $this->authorId;
  103.     }
  104.     /**
  105.      * Set authorClass.
  106.      *
  107.      * @param string|null $authorClass
  108.      *
  109.      * @return Trace
  110.      */
  111.     public function setAuthorClass($authorClass null)
  112.     {
  113.         $this->authorClass $authorClass;
  114.         return $this;
  115.     }
  116.     /**
  117.      * Get authorClass.
  118.      *
  119.      * @return string|null
  120.      */
  121.     public function getAuthorClass()
  122.     {
  123.         return $this->authorClass;
  124.     }
  125.     /**
  126.      * Set subjectId.
  127.      *
  128.      * @param int|null $subjectId
  129.      *
  130.      * @return Trace
  131.      */
  132.     public function setSubjectId($subjectId null)
  133.     {
  134.         $this->subjectId $subjectId;
  135.         return $this;
  136.     }
  137.     /**
  138.      * Get subjectId.
  139.      *
  140.      * @return int|null
  141.      */
  142.     public function getSubjectId()
  143.     {
  144.         return $this->subjectId;
  145.     }
  146.     /**
  147.      * Set subjectClass.
  148.      *
  149.      * @param string|null $subjectClass
  150.      *
  151.      * @return Trace
  152.      */
  153.     public function setSubjectClass($subjectClass null)
  154.     {
  155.         $this->subjectClass $subjectClass;
  156.         return $this;
  157.     }
  158.     /**
  159.      * Get subjectClass.
  160.      *
  161.      * @return string|null
  162.      */
  163.     public function getSubjectClass()
  164.     {
  165.         return $this->subjectClass;
  166.     }
  167.     /**
  168.      * Set details.
  169.      *
  170.      * @param array|null $details
  171.      *
  172.      * @return Trace
  173.      */
  174.     public function setDetails($details null)
  175.     {
  176.         $this->details $details;
  177.         return $this;
  178.     }
  179.     /**
  180.      * Get details.
  181.      *
  182.      * @return array|null
  183.      */
  184.     public function getDetails()
  185.     {
  186.         return $this->details;
  187.     }
  188.     /**
  189.      * Set created.
  190.      *
  191.      * @param \DateTime $created
  192.      *
  193.      * @return Trace
  194.      */
  195.     public function setCreated($created)
  196.     {
  197.         $this->created $created;
  198.         return $this;
  199.     }
  200.     /**
  201.      * Get created.
  202.      *
  203.      * @return \DateTime
  204.      */
  205.     public function getCreated()
  206.     {
  207.         return $this->created;
  208.     }
  209.     /**
  210.      * @return null|string
  211.      */
  212.     public function getType()
  213.     {
  214.         return $this->type;
  215.     }
  216.     /**
  217.      * @param null|string $type
  218.      */
  219.     public function setType($type)
  220.     {
  221.         $this->type $type;
  222.     }
  223.     /**
  224.      * @return string|null
  225.      */
  226.     public function getIp(): ?string
  227.     {
  228.         return $this->ip;
  229.     }
  230.     /**
  231.      * @param string|null $ip
  232.      */
  233.     public function setIp(?string $ip): void
  234.     {
  235.         $this->ip $ip;
  236.     }
  237.     /**
  238.      * @return mixed
  239.      */
  240.     public function getImpersonator(): ?User
  241.     {
  242.         return $this->impersonator;
  243.     }
  244.     /**
  245.      * @param mixed $impersonator
  246.      */
  247.     public function setImpersonator(?User $impersonator): void
  248.     {
  249.         $this->impersonator $impersonator;
  250.     }
  251. }