src/Entity/Billing.php line 11

  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\BillingRepository;
  4. use App\Traits\Timestamps;
  5. use Doctrine\ORM\Mapping as ORM;
  6. #[ORM\Entity(repositoryClassBillingRepository::class)]
  7. #[ORM\HasLifecycleCallbacks]
  8. class Billing
  9. {
  10.     use Timestamps;
  11.     #[ORM\Id]
  12.     #[ORM\GeneratedValue]
  13.     #[ORM\Column]
  14.     private ?int $id null;
  15.     #[ORM\OneToOne(inversedBy'billing'cascade: ['persist''remove'])]
  16.     #[ORM\JoinColumn(nullablefalse)]
  17.     private ?Client $client null;
  18.     #[ORM\Column(length255)]
  19.     private ?string $email null;
  20.     #[ORM\Column(length255)]
  21.     private ?string $companyName null;
  22.     #[ORM\Column(length255nullabletrue)]
  23.     private ?string $billingEmail null;
  24.     #[ORM\Column(length255)]
  25.     private ?string $address null;
  26.     #[ORM\Column(length255nullabletrue)]
  27.     private ?string $address2 null;
  28.     #[ORM\Column(length255)]
  29.     private ?string $city null;
  30.     #[ORM\Column(length255)]
  31.     private ?string $country null;
  32.     #[ORM\Column(length20)]
  33.     private ?string $postalCode null;
  34.     #[ORM\Column(length100nullabletrue)]
  35.     private ?string $businessTaxType null;
  36.     #[ORM\Column(length100nullabletrue)]
  37.     private ?string $businessTaxId null;
  38.     #[ORM\Column(length100nullabletrue)]
  39.     private ?string $poNumber null;
  40.     public function getId(): ?int
  41.     {
  42.         return $this->id;
  43.     }
  44.     public function getClient(): ?Client
  45.     {
  46.         return $this->client;
  47.     }
  48.     public function setClient(Client $client): static
  49.     {
  50.         $this->client $client;
  51.         return $this;
  52.     }
  53.     public function getEmail(): ?string
  54.     {
  55.         return $this->email;
  56.     }
  57.     public function setEmail(string $email): static
  58.     {
  59.         $this->email $email;
  60.         return $this;
  61.     }
  62.     public function getCompanyName(): ?string
  63.     {
  64.         return $this->companyName;
  65.     }
  66.     public function setCompanyName(string $companyName): static
  67.     {
  68.         $this->companyName $companyName;
  69.         return $this;
  70.     }
  71.     public function getBillingEmail(): ?string
  72.     {
  73.         return $this->billingEmail;
  74.     }
  75.     public function setBillingEmail(?string $billingEmail): static
  76.     {
  77.         $this->billingEmail $billingEmail;
  78.         return $this;
  79.     }
  80.     public function getAddress(): ?string
  81.     {
  82.         return $this->address;
  83.     }
  84.     public function setAddress(string $address): static
  85.     {
  86.         $this->address $address;
  87.         return $this;
  88.     }
  89.     public function getCity(): ?string
  90.     {
  91.         return $this->city;
  92.     }
  93.     public function setCity(string $city): static
  94.     {
  95.         $this->city $city;
  96.         return $this;
  97.     }
  98.     public function getCountry(): ?string
  99.     {
  100.         return $this->country;
  101.     }
  102.     public function setCountry(string $country): static
  103.     {
  104.         $this->country $country;
  105.         return $this;
  106.     }
  107.     public function getPostalCode(): ?string
  108.     {
  109.         return $this->postalCode;
  110.     }
  111.     public function setPostalCode(string $postalCode): static
  112.     {
  113.         $this->postalCode $postalCode;
  114.         return $this;
  115.     }
  116.     public function getAddress2(): ?string
  117.     {
  118.         return $this->address2;
  119.     }
  120.     public function setAddress2(?string $address2): static
  121.     {
  122.         $this->address2 $address2;
  123.         return $this;
  124.     }
  125.     public function getBusinessTaxType(): ?string
  126.     {
  127.         return $this->businessTaxType;
  128.     }
  129.     public function setBusinessTaxType(?string $businessTaxType): static
  130.     {
  131.         $this->businessTaxType $businessTaxType;
  132.         return $this;
  133.     }
  134.     public function getBusinessTaxId(): ?string
  135.     {
  136.         return $this->businessTaxId;
  137.     }
  138.     public function setBusinessTaxId(?string $businessTaxId): static
  139.     {
  140.         $this->businessTaxId $businessTaxId;
  141.         return $this;
  142.     }
  143.     public function getPoNumber(): ?string
  144.     {
  145.         return $this->poNumber;
  146.     }
  147.     public function setPoNumber(?string $poNumber): static
  148.     {
  149.         $this->poNumber $poNumber;
  150.         return $this;
  151.     }
  152.     public function __toString(): string
  153.     {
  154.         return $this->companyName ?? 'Billing #' $this->id;
  155.     }
  156. }