src/App/Entity/Company.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Entity\Traits\Idable;
  4. use App\Repository\CompanyRepository;
  5. use Doctrine\Common\Collections\ArrayCollection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. #[ORM\Entity(repositoryClassCompanyRepository::class)]
  8. #[ORM\Table(name'companies')]
  9. class Company
  10. {
  11.     use Idable;
  12.     #[ORM\Column(type'string'length255)]
  13.     private ?string $name;
  14.     #[ORM\Column(type'string')]
  15.     private $currency;
  16.     #[ORM\Column(type'boolean')]
  17.     private ?bool $isActive;
  18.     #[ORM\Column(nullabletrue)]
  19.     #[ORM\ManyToOne(targetEntityCompany::class, inversedBy'children')]
  20.     private ?Company $parent null;
  21.     #[ORM\Column(nullabletrue)]
  22.     #[ORM\OneToMany(mappedBy'parent'targetEntityCompany::class)]
  23.     private $children;
  24.     #[ORM\Column(nullabletrue)]
  25.     #[ORM\OneToMany(mappedBy'company'targetEntityUser::class)]
  26.     private $users;
  27.     #[ORM\Column(type'string'length255nullabletrue)]
  28.     private ?string $uid;
  29.     #[ORM\Column(type'string'length255nullabletrue)]
  30.     private ?string $locationType ;
  31.     #[ORM\Column(type'string'length255nullabletrue)]
  32.     private ?string $notificationEmail ;
  33.     #[ORM\Column(type'float'precision15scale4nullabletrue)]
  34.     private $credit;
  35.     #[ORM\Column(type'float'precision15scale4nullabletrue)]
  36.     private $creditBalance;
  37.     #[ORM\Column(type'string'length255nullabletrue)]
  38.     private ?string $corporateCardId;
  39.     #[ORM\Column(type'string'length255nullabletrue)]
  40.     private string $vatNumber;
  41.     #[ORM\Column(type'string'length255nullabletrue)]
  42.     private string $vatOffice;
  43.     #[ORM\Column(type'string'length255nullabletrue)]
  44.     private string $registrationNumber;
  45.     #[ORM\Column(type'boolean'options: ['default' => 1])]
  46.     private ?bool $isCreditActive;
  47.     #[ORM\Column(type'string'nullabletrue)]
  48.     protected $contactName;
  49.     #[ORM\Column(type'string'nullabletrue)]
  50.     protected $contactPhone;
  51.     #[ORM\Column(type'string'length180nullabletrue)]
  52.     protected $contactEmail;
  53.     #[ORM\Column(type'string'nullabletrue)]
  54.     protected $financeContactName;
  55.     #[ORM\Column(type'string'nullabletrue)]
  56.     protected $financeContactPhone;
  57.     #[ORM\Column(type'string'length180nullabletrue)]
  58.     protected $financeContactEmail;
  59.     public function __construct()
  60.     {
  61.         $this->children = new ArrayCollection();
  62.         $this->users = new ArrayCollection();
  63.     }
  64.     /**
  65.      * @return mixed
  66.      */
  67.     public function getFinanceContactName()
  68.     {
  69.         return $this->financeContactName;
  70.     }
  71.     /**
  72.      * @param mixed $financeContactName
  73.      */
  74.     public function setFinanceContactName($financeContactName): void
  75.     {
  76.         $this->financeContactName $financeContactName;
  77.     }
  78.     /**
  79.      * @return mixed
  80.      */
  81.     public function getFinanceContactPhone()
  82.     {
  83.         return $this->financeContactPhone;
  84.     }
  85.     /**
  86.      * @param mixed $financeContactPhone
  87.      */
  88.     public function setFinanceContactPhone($financeContactPhone): void
  89.     {
  90.         $this->financeContactPhone $financeContactPhone;
  91.     }
  92.     /**
  93.      * @return mixed
  94.      */
  95.     public function getFinanceContactEmail()
  96.     {
  97.         return $this->financeContactEmail;
  98.     }
  99.     /**
  100.      * @param mixed $financeContactEmail
  101.      */
  102.     public function setFinanceContactEmail($financeContactEmail): void
  103.     {
  104.         $this->financeContactEmail $financeContactEmail;
  105.     }
  106.     public function getName(): ?string
  107.     {
  108.         return $this->name;
  109.     }
  110.     public function setName(?string $name): void
  111.     {
  112.         $this->name $name;
  113.     }
  114.     /**
  115.      * @return mixed
  116.      */
  117.     public function getCurrency()
  118.     {
  119.         return $this->currency;
  120.     }
  121.     /**
  122.      * @param mixed $currency
  123.      */
  124.     public function setCurrency($currency): void
  125.     {
  126.         $this->currency $currency;
  127.     }
  128.     public function getIsActive(): ?bool
  129.     {
  130.         return $this->isActive;
  131.     }
  132.     public function setIsActive(?bool $isActive): void
  133.     {
  134.         $this->isActive $isActive;
  135.     }
  136.     public function getParent(): ?Company
  137.     {
  138.         return $this->parent;
  139.     }
  140.     public function setParent(?Company $parent): void
  141.     {
  142.         $this->parent $parent;
  143.     }
  144.     public function getChildren(): ArrayCollection|null
  145.     {
  146.         return $this->children;
  147.     }
  148.     public function setChildren(ArrayCollection $children): void
  149.     {
  150.         $this->children $children;
  151.     }
  152.     public function getUsers(): ArrayCollection|null
  153.     {
  154.         return $this->users;
  155.     }
  156.     public function setUsers(ArrayCollection $users): void
  157.     {
  158.         $this->users $users;
  159.     }
  160.     public function getUid(): ?string
  161.     {
  162.         return $this->uid;
  163.     }
  164.     public function setUid(?string $uid): void
  165.     {
  166.         $this->uid $uid;
  167.     }
  168.     public function getLocationType(): string|null
  169.     {
  170.         return $this->locationType ;
  171.     }
  172.     public function setLocationType(string $locationType): void
  173.     {
  174.         $this->locationType $locationType;
  175.     }
  176.     public function getNotificationEmail(): string|null
  177.     {
  178.         return $this->notificationEmail;
  179.     }
  180.     public function setNotificationEmail(string $notificationEmail): void
  181.     {
  182.         $this->notificationEmail $notificationEmail;
  183.     }
  184.     /**
  185.      * @return mixed
  186.      */
  187.     public function getCredit()
  188.     {
  189.         return $this->credit;
  190.     }
  191.     /**
  192.      * @param mixed $credit
  193.      */
  194.     public function setCredit($credit): void
  195.     {
  196.         $this->credit $credit;
  197.     }
  198.     /**
  199.      * @return mixed
  200.      */
  201.     public function getCreditBalance()
  202.     {
  203.         return $this->creditBalance;
  204.     }
  205.     /**
  206.      * @param mixed $creditBalance
  207.      */
  208.     public function setCreditBalance($creditBalance): void
  209.     {
  210.         $this->creditBalance $creditBalance;
  211.     }
  212.     public function getCorporateCardId(): ?string
  213.     {
  214.         return $this->corporateCardId;
  215.     }
  216.     public function setCorporateCardId(?string $corporateCardId): void
  217.     {
  218.         $this->corporateCardId $corporateCardId;
  219.     }
  220.     public function getVatNumber(): string
  221.     {
  222.         return $this->vatNumber;
  223.     }
  224.     public function setVatNumber(string $vatNumber): void
  225.     {
  226.         $this->vatNumber $vatNumber;
  227.     }
  228.     public function getVatOffice(): string
  229.     {
  230.         return $this->vatOffice;
  231.     }
  232.     public function setVatOffice(string $vatOffice): void
  233.     {
  234.         $this->vatOffice $vatOffice;
  235.     }
  236.     public function getRegistrationNumber(): string
  237.     {
  238.         return $this->registrationNumber;
  239.     }
  240.     public function setRegistrationNumber(string $registrationNumber): void
  241.     {
  242.         $this->registrationNumber $registrationNumber;
  243.     }
  244.     public function getIsCreditActive(): ?bool
  245.     {
  246.         return $this->isCreditActive;
  247.     }
  248.     public function setIsCreditActive(?bool $isCreditActive): void
  249.     {
  250.         $this->isCreditActive $isCreditActive;
  251.     }
  252.     /**
  253.      * @return mixed
  254.      */
  255.     public function getContactName()
  256.     {
  257.         return $this->contactName;
  258.     }
  259.     /**
  260.      * @param mixed $contactName
  261.      */
  262.     public function setContactName($contactName): void
  263.     {
  264.         $this->contactName $contactName;
  265.     }
  266.     /**
  267.      * @return mixed
  268.      */
  269.     public function getContactPhone()
  270.     {
  271.         return $this->contactPhone;
  272.     }
  273.     /**
  274.      * @param mixed $contactPhone
  275.      */
  276.     public function setContactPhone($contactPhone): void
  277.     {
  278.         $this->contactPhone $contactPhone;
  279.     }
  280.     /**
  281.      * @return mixed
  282.      */
  283.     public function getContactEmail()
  284.     {
  285.         return $this->contactEmail;
  286.     }
  287.     /**
  288.      * @param mixed $contactEmail
  289.      */
  290.     public function setContactEmail($contactEmail): void
  291.     {
  292.         $this->contactEmail $contactEmail;
  293.     }
  294. }