src/Entity/History.php line 19

Open in your IDE?
  1. <?php
  2. /**
  3.  * Created by PhpStorm.
  4.  * User: fmartinbrossat
  5.  * Date: 2019-01-09
  6.  * Time: 14:35
  7.  */
  8. namespace App\Entity;
  9. use Doctrine\ORM\Mapping as ORM;
  10. use App\Entity\SysUsers;
  11. /**
  12.  * @ORM\Entity
  13.  * @ORM\Table(name="history")
  14.  */
  15. class History
  16. {
  17.     /**
  18.      * @ORM\Column(type="integer")
  19.      * @ORM\Id
  20.      * @ORM\GeneratedValue(strategy="AUTO")
  21.      */
  22.     protected $id;
  23.     /**
  24.      * Many History have One User.
  25.      * @ORM\ManyToOne(targetEntity="SysUsers", inversedBy="history")
  26.      * @ORM\JoinColumn(name="h_user", referencedColumnName="id")
  27.      */
  28.     protected $user;
  29.     /**
  30.      * @ORM\Column(name="h_date_create", type="datetime")
  31.      */
  32.     protected $date;
  33.     /**
  34.      * @ORM\Column(name="h_column", type="string")
  35.      */
  36.     protected $column;
  37.     /**
  38.      * @ORM\Column(name="h_entity", type="string")
  39.      */
  40.     protected $entity;
  41.     /**
  42.      * @ORM\Column(name="h_entity_id", type="integer")
  43.      */
  44.     protected $entityId;
  45.     /**
  46.      * @ORM\Column(name="h_old_value", type="string", nullable=true),
  47.      */
  48.     protected $oldValue;
  49.     /**
  50.      * @ORM\Column(name="h_new_value", type="string", nullable=true)
  51.      */
  52.     protected $newValue;
  53.     /**
  54.      * @return mixed
  55.      */
  56.     public function getId()
  57.     {
  58.         return $this->id;
  59.     }
  60.     /**
  61.      * @param mixed $id
  62.      */
  63.     public function setId($id): void
  64.     {
  65.         $this->id $id;
  66.     }
  67.     /**
  68.      * @return mixed
  69.      */
  70.     public function getUser()
  71.     {
  72.         return $this->user;
  73.     }
  74.     /**
  75.      * @param mixed $user
  76.      */
  77.     public function setUser($user): void
  78.     {
  79.         $this->user $user;
  80.     }
  81.     /**
  82.      * @return \DateTime
  83.      */
  84.     public function getDate(): \DateTime
  85.     {
  86.         return $this->date;
  87.     }
  88.     /**
  89.      * @param \DateTime $date
  90.      */
  91.     public function setDate(\DateTime $date): void
  92.     {
  93.         $this->date $date;
  94.     }
  95.     /**
  96.      * @return string
  97.      */
  98.     public function getColumn(): string
  99.     {
  100.         return $this->column;
  101.     }
  102.     /**
  103.      * @param string $column
  104.      */
  105.     public function setColumn(string $column): void
  106.     {
  107.         $this->column $column;
  108.     }
  109.     /**
  110.      * @return string
  111.      */
  112.     public function getEntity(): string
  113.     {
  114.         return $this->entity;
  115.     }
  116.     /**
  117.      * @param string $entity
  118.      */
  119.     public function setEntity(string $entity): void
  120.     {
  121.         $this->entity $entity;
  122.     }
  123.     /**
  124.      * @return mixed
  125.      */
  126.     public function getEntityId()
  127.     {
  128.         return $this->entityId;
  129.     }
  130.     /**
  131.      * @param mixed $entityId
  132.      */
  133.     public function setEntityId($entityId): void
  134.     {
  135.         $this->entityId $entityId;
  136.     }
  137.     /**
  138.      * @return mixed
  139.      */
  140.     public function getOldValue()
  141.     {
  142.         return $this->oldValue;
  143.     }
  144.     /**
  145.      * @param mixed $oldValue
  146.      */
  147.     public function setOldValue($oldValue): void
  148.     {
  149.         $this->oldValue $oldValue;
  150.     }
  151.     /**
  152.      * @return mixed
  153.      */
  154.     public function getNewValue()
  155.     {
  156.         return $this->newValue;
  157.     }
  158.     /**
  159.      * @param mixed $newValue
  160.      */
  161.     public function setNewValue($newValue): void
  162.     {
  163.         $this->newValue $newValue;
  164.     }
  165. }