src/Admin/Modules/Contract/Entity/ContractLeadConfigFlag.php line 12

  1. <?php
  2. namespace App\Admin\Modules\Contract\Entity;
  3. use Doctrine\DBAL\Types\Types;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * @ORM\Table(name="contract_lead_config_flag", uniqueConstraints={@ORM\UniqueConstraint(columns={"id_contract_lead_config", "name"})})
  7.  * @ORM\Entity
  8.  */
  9. class ContractLeadConfigFlag
  10. {
  11.     /**
  12.      * @var int
  13.      *
  14.      * @ORM\Column(type="bigint", options={"unsigned"=true}))
  15.      * @ORM\Id
  16.      * @ORM\GeneratedValue(strategy="AUTO")
  17.      */
  18.     protected $id;
  19.     
  20.     /**
  21.      * @ORM\ManyToOne(targetEntity="App\Admin\Modules\Contract\Entity\ContractLeadConfig", inversedBy="flags")
  22.      * @ORM\JoinColumns({
  23.      *   @ORM\JoinColumn(name="id_contract_lead_config", referencedColumnName="id", nullable=false, onDelete="CASCADE")
  24.      * })
  25.      */
  26.     private $config;
  27.     
  28.     /**
  29.      * @var string
  30.      *
  31.      * @ORM\Column(name="name", type="string", length=255, nullable=false, options={"collation"="utf8_unicode_ci"})
  32.      */
  33.     private $name;
  34.     
  35.     /**
  36.      * @var string
  37.      *
  38.      * @ORM\Column(name="color", type="string", length=10, nullable=false)
  39.      */
  40.     private $color;
  41.     
  42.     public function __toString()
  43.     {
  44.         return $this->name;
  45.     }
  46.     public function getId(): ?string
  47.     {
  48.         return $this->id;
  49.     }
  50.     public function getName(): ?string
  51.     {
  52.         return $this->name;
  53.     }
  54.     public function setName(string $name): self
  55.     {
  56.         $this->name $name;
  57.         return $this;
  58.     }
  59.     public function getColor(): ?string
  60.     {
  61.         return $this->color;
  62.     }
  63.     public function setColor(string $color): self
  64.     {
  65.         $this->color $color;
  66.         return $this;
  67.     }
  68.     public function getConfig(): ?ContractLeadConfig
  69.     {
  70.         return $this->config;
  71.     }
  72.     public function setConfig(?ContractLeadConfig $config): self
  73.     {
  74.         $this->config $config;
  75.         return $this;
  76.     }    
  77. }