src/Entity/CustomerMoral.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\CustomerMoralRepository;
  4. use App\Trait\PersonMoral;
  5. use Doctrine\DBAL\Types\Types;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use Symfony\Component\Serializer\Annotation\Groups;
  8. #[ORM\Entity(repositoryClassCustomerMoralRepository::class)]
  9. class CustomerMoral extends Customer
  10. {
  11.     use PersonMoral;
  12.     #[ORM\Column(typeTypes::BOOLEAN)]
  13.     #[Groups(['customer:read'])]
  14.     private ?bool $exemptTax false;
  15.     #[ORM\Column(typeTypes::BOOLEAN)]
  16.     #[Groups(['customer:read'])]
  17.     private ?bool $exemptStamp false;
  18.     #[ORM\Column(typeTypes::DECIMALprecision20scale3)]
  19.     private ?float $authorizedCreditAmount 0;
  20.     #[ORM\Column(nullabletrue)]
  21.     private ?bool $preferred null;
  22.     #[ORM\Column(nullabletrue)]
  23.     private ?int $corporateStrategy null;
  24.     #[ORM\Column]
  25.     private ?float $resellerMargin null;
  26.     #[ORM\Column]
  27.     private ?bool $logoVisibility false;
  28.     public function __construct()
  29.     {
  30.         parent::__construct();
  31.     }
  32.     public function getExemptTax(): ?bool
  33.     {
  34.         return $this->exemptTax;
  35.     }
  36.     public function setExemptTax(bool $exempt_tax): self
  37.     {
  38.         $this->exemptTax $exempt_tax;
  39.         return $this;
  40.     }
  41.     public function getExemptStamp(): ?bool
  42.     {
  43.         return $this->exemptStamp;
  44.     }
  45.     public function setExemptStamp(bool $exempt_stamp): self
  46.     {
  47.         $this->exemptStamp $exempt_stamp;
  48.         return $this;
  49.     }
  50.     public function getCreditAmountAuthorized(): ?float
  51.     {
  52.         return $this->authorizedCreditAmount;
  53.     }
  54.     public function setCreditAmountAuthorized(float $credit_amount_authorized): self
  55.     {
  56.         $this->authorizedCreditAmount $credit_amount_authorized;
  57.         return $this;
  58.     }
  59.     public function isPreferred(): ?bool
  60.     {
  61.         return $this->preferred;
  62.     }
  63.     public function setPreferred(bool $preferred): self
  64.     {
  65.         $this->preferred $preferred;
  66.         return $this;
  67.     }
  68.     public function getCorporateStrategy(): ?int
  69.     {
  70.         return $this->corporateStrategy;
  71.     }
  72.     public function setCorporateStrategy(?int $corporate_strategy): self
  73.     {
  74.         $this->corporateStrategy $corporate_strategy;
  75.         return $this;
  76.     }
  77.     public function getClass()  : string {
  78.         return "CustomerMoral";
  79.     }
  80.     public function __toString(): string
  81.     {
  82.         return $this->getName() . ' - BTOB';
  83.     }
  84.     public function getResellerMargin(): ?float
  85.     {
  86.         return $this->resellerMargin;
  87.     }
  88.     public function setResellerMargin(?float $resellerMargin): static
  89.     {
  90.         $this->resellerMargin $resellerMargin;
  91.         return $this;
  92.     }
  93.     public function isLogoVisibility(): ?bool
  94.     {
  95.         return $this->logoVisibility;
  96.     }
  97.     public function setLogoVisibility(bool $logoVisibility): static
  98.     {
  99.         $this->logoVisibility $logoVisibility;
  100.         return $this;
  101.     }
  102. }