src/Entity/Activities.php line 16

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Symfony\Component\Validator\Constraints as Assert;
  5. use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  6. /**
  7.  * Activities
  8.  *
  9.  * @ORM\Table(name="activities")
  10.  * @ORM\Entity(repositoryClass="App\Repository\ActivitiesRepository")
  11.  * @ORM\HasLifecycleCallbacks()
  12.  */
  13. class Activities
  14. {
  15.     /**
  16.      * @var int
  17.      *
  18.      * @ORM\Column(name="id", type="integer")
  19.      * @ORM\Id
  20.      * @ORM\GeneratedValue(strategy="AUTO")
  21.      */
  22.     private $id;
  23.     /**
  24.      * @var string
  25.      *
  26.      * @ORM\Column(name="name", type="string", length=255)
  27.      */
  28.     private $name;
  29.     /**
  30.      * @var string
  31.      *
  32.      * @ORM\Column(name="destination_id", type="string", length=255, nullable=true)
  33.      */
  34.     private $destinationId;
  35.     /**
  36.      * @var string
  37.      *
  38.      * @ORM\Column(name="observation", type="text", nullable=true)
  39.      */
  40.     private $observation;
  41.     /**
  42.      * @var int
  43.      *
  44.      * @ORM\Column(name="created_id", type="integer")
  45.      */
  46.     private $createdId;
  47.     /**
  48.      * @var \DateTime
  49.      *
  50.      * @ORM\Column(name="created_at", type="datetime")
  51.      */
  52.     private $createdAt;
  53.     /**
  54.      * @var int
  55.      *
  56.      * @ORM\Column(name="updated_id", type="integer")
  57.      */
  58.     private $updatedId;
  59.     /**
  60.      * @var \DateTime
  61.      *
  62.      * @ORM\Column(name="updated_at", type="datetime")
  63.      */
  64.     private $updatedAt;
  65.     /**
  66.      * Get id
  67.      *
  68.      * @return int
  69.      */
  70.     public function getId()
  71.     {
  72.         return $this->id;
  73.     }
  74.     /**
  75.      * Set name
  76.      *
  77.      * @param string $name
  78.      *
  79.      * @return Activities
  80.      */
  81.     public function setName($name)
  82.     {
  83.         $this->name $name;
  84.         return $this;
  85.     }
  86.     /**
  87.      * Get name
  88.      *
  89.      * @return string
  90.      */
  91.     public function getName()
  92.     {
  93.         return $this->name;
  94.     }
  95.     /**
  96.      * Set destinationId
  97.      *
  98.      * @param string $destinationId
  99.      *
  100.      * @return Activities
  101.      */
  102.     public function setDestinationId($destinationId)
  103.     {
  104.         $this->destinationId $destinationId;
  105.         return $this;
  106.     }
  107.     /**
  108.      * Get destinationId
  109.      *
  110.      * @return string
  111.      */
  112.     public function getDestinationId()
  113.     {
  114.         return $this->destinationId;
  115.     }
  116.     /**
  117.      * Set observation
  118.      *
  119.      * @param string $observation
  120.      *
  121.      * @return Activities
  122.      */
  123.     public function setObservation($observation)
  124.     {
  125.         $this->observation $observation;
  126.         return $this;
  127.     }
  128.     /**
  129.      * Get observation
  130.      *
  131.      * @return string
  132.      */
  133.     public function getObservation()
  134.     {
  135.         return $this->observation;
  136.     }
  137.     /**
  138.      * Set createdId
  139.      *
  140.      * @param integer $createdId
  141.      *
  142.      * @return Activities
  143.      */
  144.     public function setCreatedId($createdId)
  145.     {
  146.         $this->createdId $createdId;
  147.         return $this;
  148.     }
  149.     /**
  150.      * Get createdId
  151.      *
  152.      * @return integer
  153.      */
  154.     public function getCreatedId()
  155.     {
  156.         return $this->createdId;
  157.     }
  158.     /**
  159.      * Set createdAt
  160.      *
  161.      * @param \DateTime $createdAt
  162.      *
  163.      * @return Activities
  164.      */
  165.     public function setCreatedAt(\Datetime $createdAt)
  166.     {
  167.         $this->createdAt $createdAt;
  168.         return $this;
  169.     }
  170.     /**
  171.      * Get createdAt
  172.      *
  173.      * @return \DateTime
  174.      */
  175.     public function getCreatedAt()
  176.     {
  177.         return $this->createdAt;
  178.     }
  179.     /**
  180.      * Set updatedId
  181.      *
  182.      * @param integer $updatedId
  183.      *
  184.      * @return Activities
  185.      */
  186.     public function setUpdatedId($updatedId)
  187.     {
  188.         $this->updatedId $updatedId;
  189.         return $this;
  190.     }
  191.     /**
  192.      * Get updatedId
  193.      *
  194.      * @return integer
  195.      */
  196.     public function getUpdatedId()
  197.     {
  198.         return $this->updatedId;
  199.     }
  200.     /**
  201.      * Set updatedAt
  202.      *
  203.      * @param \DateTime $updatedAt
  204.      *
  205.      * @return Activities
  206.      */
  207.     public function setUpdatedAt(\Datetime $updatedAt)
  208.     {
  209.         $this->updatedAt $updatedAt;
  210.         return $this;
  211.     }
  212.     /**
  213.      * Get updatedAt
  214.      *
  215.      * @return \DateTime
  216.      */
  217.     public function getUpdatedAt()
  218.     {
  219.         return $this->updatedAt;
  220.     }
  221.     /**
  222.      * @ORM\PrePersist
  223.      */
  224.     public function setCreatedAtValue()
  225.     {
  226.         $this->createdAt = new \Datetime();
  227.     }
  228.     /**
  229.      * @ORM\PrePersist
  230.      * @ORM\PreUpdate
  231.      */
  232.     public function setUpdatedAtValue()
  233.     {
  234.         $this->updatedAt = new \Datetime();
  235.     }
  236. }