src/AtechNet/CoreBundle/Entity/CustomerNote.php line 18

Open in your IDE?
  1. <?php
  2. namespace App\AtechNet\CoreBundle\Entity;
  3. use App\AtechNet\CoreBundle\Repository\CustomerNoteRepository;
  4. use Doctrine\ORM\Mapping\Column;
  5. use Doctrine\ORM\Mapping\Entity;
  6. use Doctrine\ORM\Mapping\JoinColumn;
  7. use Doctrine\ORM\Mapping\ManyToOne;
  8. use Doctrine\ORM\Mapping\Table as Table;
  9. /**
  10.  * CustomerNote
  11.  *
  12.  * @Table(name="customers__notes")
  13.  * @Entity(repositoryClass=CustomerNoteRepository::class)
  14.  */
  15. class CustomerNote extends AbstractSignedEntity
  16. {
  17.     public const CustomerNoteType_Note = 1;
  18.     public const CustomerNoteType_Meeting = 2;
  19.     public const CustomerNoteType_Event = 3;
  20.     public static function getNoteTypes()
  21.     {
  22.         return [
  23.             self::CustomerNoteType_Note => 'Note',
  24.             self::CustomerNoteType_Meeting => 'Meeting',
  25.             self::CustomerNoteType_Event => 'Event',
  26.         ];
  27.     }
  28.     /**
  29.      * @var Customer
  30.      *
  31.      * @ManyToOne(targetEntity="Customer", inversedBy="notes")
  32.      * @JoinColumn(name="customer_id", referencedColumnName="id")
  33.      */
  34.     private $customer;
  35.     /**
  36.      * @var integer
  37.      *
  38.      * @Column(name="type", type="integer")
  39.      */
  40.     private $type;
  41.     /**
  42.      * @var string
  43.      *
  44.      * @Column(name="text", type="text")
  45.      */
  46.     private $text;
  47.     /**
  48.      * @return Customer
  49.      */
  50.     public function getCustomer()
  51.     {
  52.         return $this->customer;
  53.     }
  54.     /**
  55.      * @param Customer $customer
  56.      */
  57.     public function setCustomer($customer)
  58.     {
  59.         $this->customer = $customer;
  60.     }
  61.     /**
  62.      * Set type
  63.      *
  64.      * @param integer $type
  65.      * @return CustomerNote
  66.      */
  67.     public function setType($type)
  68.     {
  69.         $this->type = $type;
  70.         return $this;
  71.     }
  72.     /**
  73.      * Get type
  74.      *
  75.      * @return integer
  76.      */
  77.     public function getType()
  78.     {
  79.         return $this->type;
  80.     }
  81.     /**
  82.      * Set text
  83.      *
  84.      * @param string $text
  85.      * @return CustomerNote
  86.      */
  87.     public function setText($text)
  88.     {
  89.         $this->text = $text;
  90.         return $this;
  91.     }
  92.     /**
  93.      * Get text
  94.      *
  95.      * @return string
  96.      */
  97.     public function getText()
  98.     {
  99.         return $this->text;
  100.     }
  101. }