src/Entity/Gos/PaymentStatus.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Gos;
  3. use Doctrine\Common\Collections\Collection;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Gedmo\Mapping\Annotation as Gedmo;
  6. use Doctrine\Common\Collections\ArrayCollection;
  7. /**
  8.  * @ORM\Table()
  9.  * @ORM\Entity(repositoryClass="App\Repository\PaymentStatusRepository")
  10.  * @ORM\HasLifecycleCallbacks
  11.  */
  12. class PaymentStatus
  13. {
  14.     /**
  15.      * @ORM\Column(type="integer")
  16.      * @ORM\Id
  17.      * @ORM\GeneratedValue(strategy="IDENTITY")
  18.      */
  19.     private $id;
  20.     /**
  21.      * @var bool
  22.      *
  23.      * @ORM\Column(name="isActive", type="boolean", nullable=true)
  24.      */
  25.     private $isActive;
  26.     /**
  27.      * @ORM\Column(type="string", nullable=true)
  28.      */
  29.     private $name;
  30.     /**
  31.      * @Gedmo\Slug(fields={"name"})
  32.      * @ORM\Column(unique=true)
  33.      */
  34.     private $slug;
  35.     /**
  36.      * @ORM\Column(type="integer", nullable=true)
  37.      */
  38.     private $number;
  39.     /**
  40.      * @ORM\OneToMany(targetEntity="App\Entity\Gos\Notify", mappedBy="paymentStatus")
  41.      */
  42.     private $notify;
  43.     /**
  44.      * @ORM\Column(type="datetime")
  45.      */
  46.     private $createdAt;
  47.     /**
  48.      * @ORM\Column(type="datetime", nullable=true)
  49.      */
  50.     private $updatedAt;
  51.     /** @ORM\PrePersist() */
  52.     public function prePersist()
  53.     {
  54.         $this->createdAt = new \DateTime();
  55.     }
  56.     /** @ORM\PreUpdate() */
  57.     public function preUpdate()
  58.     {
  59.         $this->updatedAt = new \DateTime();
  60.     }
  61.     public function __toString()
  62.     {
  63.         return (string)$this->name;
  64.     }
  65.     /**
  66.      * Constructor
  67.      */
  68.     public function __construct()
  69.     {
  70.         $this->notify = new \Doctrine\Common\Collections\ArrayCollection();
  71.     }
  72.     /**
  73.      * Get id
  74.      *
  75.      * @return integer
  76.      */
  77.     public function getId()
  78.     {
  79.         return $this->id;
  80.     }
  81.     /**
  82.      * Set isActive
  83.      *
  84.      * @param boolean $isActive
  85.      *
  86.      * @return PaymentStatus
  87.      */
  88.     public function setIsActive($isActive)
  89.     {
  90.         $this->isActive $isActive;
  91.         return $this;
  92.     }
  93.     /**
  94.      * Get isActive
  95.      *
  96.      * @return boolean
  97.      */
  98.     public function getIsActive()
  99.     {
  100.         return $this->isActive;
  101.     }
  102.     /**
  103.      * Set name
  104.      *
  105.      * @param string $name
  106.      *
  107.      * @return PaymentStatus
  108.      */
  109.     public function setName($name)
  110.     {
  111.         $this->name $name;
  112.         return $this;
  113.     }
  114.     /**
  115.      * Get name
  116.      *
  117.      * @return string
  118.      */
  119.     public function getName()
  120.     {
  121.         return $this->name;
  122.     }
  123.     /**
  124.      * Set slug
  125.      *
  126.      * @param string $slug
  127.      *
  128.      * @return PaymentStatus
  129.      */
  130.     public function setSlug($slug)
  131.     {
  132.         $this->slug $slug;
  133.         return $this;
  134.     }
  135.     /**
  136.      * Get slug
  137.      *
  138.      * @return string
  139.      */
  140.     public function getSlug()
  141.     {
  142.         return $this->slug;
  143.     }
  144.     /**
  145.      * Set number
  146.      *
  147.      * @param integer $number
  148.      *
  149.      * @return PaymentStatus
  150.      */
  151.     public function setNumber($number)
  152.     {
  153.         $this->number $number;
  154.         return $this;
  155.     }
  156.     /**
  157.      * Get number
  158.      *
  159.      * @return integer
  160.      */
  161.     public function getNumber()
  162.     {
  163.         return $this->number;
  164.     }
  165.     /**
  166.      * Set createdAt
  167.      *
  168.      * @param \DateTime $createdAt
  169.      *
  170.      * @return PaymentStatus
  171.      */
  172.     public function setCreatedAt($createdAt)
  173.     {
  174.         $this->createdAt $createdAt;
  175.         return $this;
  176.     }
  177.     /**
  178.      * Get createdAt
  179.      *
  180.      * @return \DateTime
  181.      */
  182.     public function getCreatedAt()
  183.     {
  184.         return $this->createdAt;
  185.     }
  186.     /**
  187.      * Set updatedAt
  188.      *
  189.      * @param \DateTime $updatedAt
  190.      *
  191.      * @return PaymentStatus
  192.      */
  193.     public function setUpdatedAt($updatedAt)
  194.     {
  195.         $this->updatedAt $updatedAt;
  196.         return $this;
  197.     }
  198.     /**
  199.      * Get updatedAt
  200.      *
  201.      * @return \DateTime
  202.      */
  203.     public function getUpdatedAt()
  204.     {
  205.         return $this->updatedAt;
  206.     }
  207.     /**
  208.      * Add notify
  209.      *
  210.      * @param \App\Entity\Gos\Notify $notify
  211.      *
  212.      * @return PaymentStatus
  213.      */
  214.     public function addNotify(\App\Entity\Gos\Notify $notify)
  215.     {
  216.         $this->notify[] = $notify;
  217.         return $this;
  218.     }
  219.     /**
  220.      * Remove notify
  221.      *
  222.      * @param \App\Entity\Gos\Notify $notify
  223.      */
  224.     public function removeNotify(\App\Entity\Gos\Notify $notify)
  225.     {
  226.         $this->notify->removeElement($notify);
  227.     }
  228.     /**
  229.      * Get notify
  230.      *
  231.      * @return \Doctrine\Common\Collections\Collection
  232.      */
  233.     public function getNotify()
  234.     {
  235.         return $this->notify;
  236.     }
  237. }