src/Entity/Coverage.php line 12

  1. <?php
  2. namespace App\Entity;
  3. use ApiPlatform\Metadata\ApiResource;
  4. use App\Repository\CoverageRepository;
  5. use Doctrine\DBAL\Types\Types;
  6. use Doctrine\ORM\Mapping as ORM;
  7. #[ORM\Entity(repositoryClassCoverageRepository::class)]
  8. #[ApiResource]
  9. class Coverage
  10. {
  11.     #[ORM\Id]
  12.     #[ORM\GeneratedValue]
  13.     #[ORM\Column]
  14.     private ?int $id null;
  15.     #[ORM\Column(typeTypes::DATE_MUTABLE)]
  16.     private ?\DateTimeInterface $inceptionDate null;
  17.     #[ORM\Column(typeTypes::DATE_MUTABLE)]
  18.     private ?\DateTimeInterface $expiryDate null;
  19.     #[ORM\Column]
  20.     private ?float $premium null;
  21.     #[ORM\Column(typeTypes::DATE_MUTABLE)]
  22.     private ?\DateTimeInterface $creationDate null;
  23.     #[ORM\ManyToOne(inversedBy'coverages')]
  24.     #[ORM\JoinColumn(nullablefalse)]
  25.     private ?Users $createdBy null;
  26.     #[ORM\Column]
  27.     private array $inputConfig = [];
  28.     #[ORM\Column]
  29.     private array $outputConfig = [];
  30.     #[ORM\Column]
  31.     private ?float $generalLimit null;
  32.     #[ORM\Column]
  33.     private ?float $unitNumber null;
  34.     #[ORM\ManyToOne(inversedBy'coverages')]
  35.     #[ORM\JoinColumn(nullablefalse)]
  36.     private ?Units $unitDefinition null;
  37.     #[ORM\ManyToOne(inversedBy'currencyCoverages')]
  38.     #[ORM\JoinColumn(nullablefalse)]
  39.     private ?Units $currency null;
  40.     #[ORM\ManyToOne(inversedBy'coverages')]
  41.     #[ORM\JoinColumn(nullablefalse)]
  42.     private ?Product $product null;
  43.     #[ORM\ManyToOne(inversedBy'coverages')]
  44.     #[ORM\JoinColumn(nullablefalse)]
  45.     private ?Insured $insured null;
  46.     #[ORM\OneToOne(inversedBy'coverage'cascade: ['persist''remove'])]
  47.     #[ORM\JoinColumn(nullablefalse)]
  48.     private ?Event $event null;
  49.     public function getId(): ?int
  50.     {
  51.         return $this->id;
  52.     }
  53.     public function getInceptionDate(): ?\DateTimeInterface
  54.     {
  55.         return $this->inceptionDate;
  56.     }
  57.     public function setInceptionDate(\DateTimeInterface $inceptionDate): self
  58.     {
  59.         $this->inceptionDate $inceptionDate;
  60.         return $this;
  61.     }
  62.     public function getExpiryDate(): ?\DateTimeInterface
  63.     {
  64.         return $this->expiryDate;
  65.     }
  66.     public function setExpiryDate(\DateTimeInterface $expiryDate): self
  67.     {
  68.         $this->expiryDate $expiryDate;
  69.         return $this;
  70.     }
  71.     public function getPremium(): ?float
  72.     {
  73.         return $this->premium;
  74.     }
  75.     public function setPremium(float $premium): self
  76.     {
  77.         $this->premium $premium;
  78.         return $this;
  79.     }
  80.     public function getCreationDate(): ?\DateTimeInterface
  81.     {
  82.         return $this->creationDate;
  83.     }
  84.     public function setCreationDate(\DateTimeInterface $creationDate): self
  85.     {
  86.         $this->creationDate $creationDate;
  87.         return $this;
  88.     }
  89.     public function getCreatedBy(): ?Users
  90.     {
  91.         return $this->createdBy;
  92.     }
  93.     public function setCreatedBy(?Users $createdBy): self
  94.     {
  95.         $this->createdBy $createdBy;
  96.         return $this;
  97.     }
  98.     public function getInputConfig(): array
  99.     {
  100.         return $this->inputConfig;
  101.     }
  102.     public function setInputConfig(array $inputConfig): self
  103.     {
  104.         $this->inputConfig $inputConfig;
  105.         return $this;
  106.     }
  107.     public function getOutputConfig(): array
  108.     {
  109.         return $this->outputConfig;
  110.     }
  111.     public function setOutputConfig(array $outputConfig): self
  112.     {
  113.         $this->outputConfig $outputConfig;
  114.         return $this;
  115.     }
  116.     public function getGeneralLimit(): ?float
  117.     {
  118.         return $this->generalLimit;
  119.     }
  120.     public function setGeneralLimit(float $generalLimit): self
  121.     {
  122.         $this->generalLimit $generalLimit;
  123.         return $this;
  124.     }
  125.     public function getUnitNumber(): ?float
  126.     {
  127.         return $this->unitNumber;
  128.     }
  129.     public function setUnitNumber(float $unitNumber): self
  130.     {
  131.         $this->unitNumber $unitNumber;
  132.         return $this;
  133.     }
  134.     public function getUnitDefinition(): ?Units
  135.     {
  136.         return $this->unitDefinition;
  137.     }
  138.     public function setUnitDefinition(?Units $unitDefinition): self
  139.     {
  140.         $this->unitDefinition $unitDefinition;
  141.         return $this;
  142.     }
  143.     public function getCurrency(): ?Units
  144.     {
  145.         return $this->currency;
  146.     }
  147.     public function setCurrency(?Units $currency): self
  148.     {
  149.         $this->currency $currency;
  150.         return $this;
  151.     }
  152.     public function getProduct(): ?Product
  153.     {
  154.         return $this->product;
  155.     }
  156.     public function setProduct(?Product $product): self
  157.     {
  158.         $this->product $product;
  159.         return $this;
  160.     }
  161.     public function getInsured(): ?Insured
  162.     {
  163.         return $this->insured;
  164.     }
  165.     public function setInsured(?Insured $insured): self
  166.     {
  167.         $this->insured $insured;
  168.         return $this;
  169.     }
  170.     public function getEvent(): ?Event
  171.     {
  172.         return $this->event;
  173.     }
  174.     public function setEvent(Event $event): self
  175.     {
  176.         $this->event $event;
  177.         return $this;
  178.     }
  179. }