src/Entity/PotentialCustomerCompanyContact.php line 17

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. /**
  6.  * @ORM\Entity(
  7.  *     repositoryClass="App\Repository\PotentialCustomerCompanyContactRepository"
  8.  * )
  9.  * @ORM\Table(
  10.  *     name="potential_customer_company_contact",
  11.  *     options={"collate"="utf8_swedish_ci"}
  12.  * )
  13.  */
  14. class PotentialCustomerCompanyContact implements EntityInterface
  15. {
  16.     /**
  17.      * @ORM\Id
  18.      * @ORM\Column(
  19.      *     type="integer"
  20.      * )
  21.      * @ORM\GeneratedValue(
  22.      *     strategy="AUTO"
  23.      * )
  24.      *
  25.      * @var int|null
  26.      */
  27.     protected ?int $id null;
  28.     /**
  29.      * @ORM\ManyToOne(
  30.      *     targetEntity="PotentialCustomerCompany",
  31.      *     inversedBy="contacts"
  32.      * )
  33.      * @ORM\JoinColumn(
  34.      *     name="company_id",
  35.      *     referencedColumnName="id"
  36.      * )
  37.      * @Assert\NotNull
  38.      *
  39.      * @var PotentialCustomerCompany
  40.      */
  41.     protected $company;
  42.     /**
  43.      * @ORM\Column(
  44.      *     type="string",
  45.      *     length=200,
  46.      *     nullable=true
  47.      * )
  48.      *
  49.      * @var string|null
  50.      */
  51.     protected $email;
  52.     /**
  53.      * @ORM\Column(
  54.      *     type="string",
  55.      *     length=500
  56.      * )
  57.      *
  58.      * @var string
  59.      */
  60.     protected $name;
  61.     /**
  62.      * @ORM\Column(
  63.      *     type="string",
  64.      *     length=20,
  65.      *     nullable=true
  66.      * )
  67.      *
  68.      * @var string|null
  69.      */
  70.     protected $phone;
  71.     /**
  72.      * @ORM\Column(
  73.      *     type="string",
  74.      *     length=200,
  75.      *     nullable=true
  76.      * )
  77.      *
  78.      * @var string|null
  79.      */
  80.     protected $role;
  81.     /**
  82.      * @return PotentialCustomerCompany
  83.      */
  84.     public function getCompany()
  85.     {
  86.         return $this->company;
  87.     }
  88.     /**
  89.      * @return null|string
  90.      */
  91.     public function getEmail()
  92.     {
  93.         return $this->email;
  94.     }
  95.     /**
  96.      * @return int|null
  97.      */
  98.     public function getId(): ?int
  99.     {
  100.         return $this->id;
  101.     }
  102.     /**
  103.      * @return string
  104.      */
  105.     public function getName()
  106.     {
  107.         return $this->name;
  108.     }
  109.     /**
  110.      * @return null|string
  111.      */
  112.     public function getPhone()
  113.     {
  114.         return $this->phone;
  115.     }
  116.     /**
  117.      * @return null|string
  118.      */
  119.     public function getRole()
  120.     {
  121.         return $this->role;
  122.     }
  123.     /**
  124.      * @param PotentialCustomerCompany $company
  125.      */
  126.     public function setCompany(PotentialCustomerCompany $company)
  127.     {
  128.         $this->company $company;
  129.     }
  130.     /**
  131.      * @param string|null $email
  132.      */
  133.     public function setEmail($email)
  134.     {
  135.         $this->email $email;
  136.     }
  137.     /**
  138.      * @param string $name
  139.      */
  140.     public function setName($name)
  141.     {
  142.         $this->name $name;
  143.     }
  144.     /**
  145.      * @param string|null $phone
  146.      */
  147.     public function setPhone($phone)
  148.     {
  149.         $this->phone $phone;
  150.     }
  151.     /**
  152.      * @param string|null $role
  153.      */
  154.     public function setRole($role)
  155.     {
  156.         $this->role $role;
  157.     }
  158. }