src/Entity/ProductService.php line 16

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use DateTime;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Symfony\Component\Validator\Constraints as Assert;
  6. /**
  7.  * ProductService
  8.  *
  9.  * @ORM\Table(name="product_service")
  10.  * @ORM\HasLifecycleCallbacks()
  11.  * @ORM\Entity(repositoryClass="App\Repository\ProductServiceRepository")
  12.  */
  13. class ProductService
  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="displayName", type="string", length=255, nullable=true)
  33.      */
  34.     private $displayName;
  35.     /**
  36.      * @var DateTime
  37.      *
  38.      * @ORM\Column(name="createdAt", type="datetime")
  39.      */
  40.     private $createdAt;
  41.     /**
  42.      * @var DateTime
  43.      *
  44.      * @ORM\Column(name="updatedAt", type="datetime")
  45.      */
  46.     private $updatedAt;
  47.     /**
  48.      * @var int
  49.      *
  50.      * @ORM\Column(name="priority", type="integer")
  51.      * @Assert\NotBlank()
  52.      * @Assert\GreaterThan(0)
  53.      */
  54.     private $priority;
  55.     /**
  56.      * Get id
  57.      *
  58.      * @return int
  59.      */
  60.     public function getId()
  61.     {
  62.         return $this->id;
  63.     }
  64.     /**
  65.      * Set name
  66.      *
  67.      * @param string $name
  68.      *
  69.      * @return ProductService
  70.      */
  71.     public function setName($name)
  72.     {
  73.         $this->name $name;
  74.         return $this;
  75.     }
  76.     /**
  77.      * Get name
  78.      *
  79.      * @return string
  80.      */
  81.     public function getName()
  82.     {
  83.         return $this->name;
  84.     }
  85.     /**
  86.      * Set displayName
  87.      *
  88.      * @param string $displayName
  89.      *
  90.      * @return ProductService
  91.      */
  92.     public function setDisplayName($displayName)
  93.     {
  94.         $this->displayName $displayName;
  95.         return $this;
  96.     }
  97.     /**
  98.      * Get displayName
  99.      *
  100.      * @return string
  101.      */
  102.     public function getDisplayName()
  103.     {
  104.         return $this->displayName;
  105.     }
  106.     /**
  107.      * @return DateTime
  108.      */
  109.     public function getCreatedAt()
  110.     {
  111.         return $this->createdAt;
  112.     }
  113.     /**
  114.      * @param DateTime $createdAt
  115.      */
  116.     public function setCreatedAt($createdAt)
  117.     {
  118.         $this->createdAt $createdAt;
  119.     }
  120.     /**
  121.      * @return DateTime
  122.      */
  123.     public function getUpdatedAt()
  124.     {
  125.         return $this->updatedAt;
  126.     }
  127.     /**
  128.      * @param DateTime $updatedAt
  129.      */
  130.     public function setUpdatedAt($updatedAt)
  131.     {
  132.         $this->updatedAt $updatedAt;
  133.     }
  134.     /**
  135.      * @ORM\PrePersist()
  136.      */
  137.     public function creationDate()
  138.     {
  139.         $this->createdAt = new DateTime();
  140.         $this->updatedAt = new DateTime();
  141.         return $this;
  142.     }
  143.     /**
  144.      * @ORM\PreUpdate
  145.      */
  146.     public function updatedDate()
  147.     {
  148.         $this->updatedAt = new DateTime();
  149.         return $this;
  150.     }
  151.     /**
  152.      * @return int
  153.      */
  154.     public function getPriority()
  155.     {
  156.         return $this->priority;
  157.     }
  158.     /**
  159.      * @param int $priority
  160.      */
  161.     public function setPriority($priority)
  162.     {
  163.         $this->priority $priority;
  164.     }
  165. }