src/Entity/Administrative.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\AdministrativeRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Symfony\Component\Serializer\Annotation\Groups;
  6. /**
  7.  * @ORM\Entity(repositoryClass=AdministrativeRepository::class)
  8.  */
  9. class Administrative
  10. {
  11.     /**
  12.      * @ORM\Id
  13.      * @ORM\GeneratedValue
  14.      * @ORM\Column(type="integer")
  15.      * @Groups({"customer.manage.base", "customer.list.base", "worker.actually.activity"})
  16.      */
  17.     private $id;
  18.     /**
  19.      * @ORM\Column(type="string", length=255)
  20.      * @Groups({"customer.manage.base"})
  21.      */
  22.     private $company_name;
  23.     /**
  24.      * @ORM\OneToOne(targetEntity=Customer::class, inversedBy="administrative", cascade={"persist", "remove"})
  25.      * @ORM\JoinColumn(nullable=false)
  26.      */
  27.     private $paired_customer;
  28.     public function getId(): ?int
  29.     {
  30.         return $this->id;
  31.     }
  32.     public function getCompanyName(): ?string
  33.     {
  34.         return $this->company_name;
  35.     }
  36.     public function setCompanyName(string $company_name): self
  37.     {
  38.         $this->company_name $company_name;
  39.         return $this;
  40.     }
  41.     public function getPairedCustomer(): ?Customer
  42.     {
  43.         return $this->paired_customer;
  44.     }
  45.     public function setPairedCustomer(Customer $paired_customer): self
  46.     {
  47.         $this->paired_customer $paired_customer;
  48.         return $this;
  49.     }
  50. }