src/Entity/Insurance.php line 18

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Validator\Constraints as AcmeAssert;
  4. use DateTime;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use Symfony\Component\HttpFoundation\File\File;
  8. use Symfony\Component\Validator\Constraints as Assert;
  9. use Vich\UploaderBundle\Mapping\Annotation as Vich;
  10. /**
  11.  * @Vich\Uploadable
  12.  */
  13. #[ORM\Entity(repositoryClass"App\Repository\InsuranceRepository")]
  14. #[ORM\Table(name"insurance")]
  15. class Insurance implements UserObjectInterface
  16. {
  17.     #[ORM\Column(type"string"length255nullabletrue)]
  18.     private ?string $relationMoreStreetNumber;
  19.     #[ORM\Column(type"string"length255nullabletrue)]
  20.     private ?string $relationMoreRoadName;
  21.     #[ORM\Column(type"string"length255nullabletrue)]
  22.     private ?string $relationMoreZipCode;
  23.     #[ORM\Column(type"string"length255nullabletrue)]
  24.     private ?string $relationMoreCity;
  25.     #[ORM\Column(type"string"length255nullabletrue)]
  26.     private ?string $insuranceMoreStreetNumber;
  27.     #[ORM\Column(type"string"length255nullabletrue)]
  28.     private ?string $insuranceMoreRoadName;
  29.     #[ORM\Column(type"string"length255nullabletrue)]
  30.     private ?string $insuranceMoreZipCode;
  31.     #[ORM\Column(type"string"length255nullabletrue)]
  32.     private ?string $insuranceMoreCity;
  33.     #[Assert\Choice(callback"getRelationTypes"multiplefalse)]
  34.     #[ORM\Column(type"string"length255nullabletrue)]
  35.     private ?string $relationType null;
  36.     #[ORM\OneToMany(targetEntityComplaintLetter::class, mappedBy"insurance"cascade: ["persist"])]
  37.     private Collection|array $complaintLetters;
  38.     #[ORM\OneToMany(targetEntityComplaintX::class, mappedBy"insurance"cascade: ["persist""remove"])]
  39.     private Collection|array $complaintXs;
  40.     #[ORM\Column(type"string"length255nullabletrue)]
  41.     private ?string $relationMoreName;
  42.     #[ORM\Column(type"string"length255nullabletrue)]
  43.     private ?string $relationMoreAddress;
  44.     #[ORM\Column(type"string"length255nullabletrue)]
  45.     private ?string $insuranceMoreName;
  46.     #[ORM\Column(type"string"length255nullabletrue)]
  47.     private ?string $insuranceMoreAddress;
  48.     #[ORM\Column(type"string"length255nullabletrue)]
  49.     private ?string $companyEmail;
  50.     #[ORM\ManyToMany(targetEntityDisasterDeclaration::class, mappedBy"insurances"cascade: ["persist"])]
  51.     private Collection|array $disasterDeclarations;
  52.     #[ORM\Column(name"createdAt"type"datetime")]
  53.     private ?DateTime $createdAt;
  54.     #[ORM\ManyToOne(targetEntityUser::class, inversedBy"insurances"fetch"EXTRA_LAZY")]
  55.     #[ORM\JoinColumn(nullablefalse)]
  56.     private User $user;
  57.     #[ORM\Column(type"boolean")]
  58.     private bool $isDeleted false;
  59.     #[ORM\Column(name"id"type"integer")]
  60.     #[ORM\Id]
  61.     #[ORM\GeneratedValue(strategy"AUTO")]
  62.     private ?int $id null;
  63.     #[ORM\ManyToOne(targetEntityItem::class, inversedBy"insurances"fetch"EXTRA_LAZY")]
  64.     #[ORM\JoinColumn(nullabletrue)]
  65.     private ?Item $item;
  66.     #[ORM\Column(type"string"length255nullabletrue)]
  67.     private ?string $otherContract;
  68.     #[ORM\ManyToOne(targetEntityVehicle::class, inversedBy"insurances"fetch"EXTRA_LAZY")]
  69.     #[ORM\JoinColumn(nullabletrue)]
  70.     private ?Vehicle $vehicle;
  71.     #[ORM\ManyToOne(targetEntityInsuranceCompany::class, inversedBy"insurances")]
  72.     #[ORM\JoinColumn(nullabletrue)]
  73.     private ?InsuranceCompany $insuranceCompany null;
  74.     #[ORM\ManyToOne(targetEntityAddress::class, inversedBy"insurance"fetch"EXTRA_LAZY")]
  75.     #[ORM\JoinColumn(nullabletrue)]
  76.     private ?Address $addressInsurance;
  77.     #[ORM\Column(type"string"length255nullabletrue)]
  78.     private ?string $gmapsAddress;
  79.     #[ORM\Column(type"string"length255nullabletrue)]
  80.     private ?string $city;
  81.     #[ORM\Column(name"zipCode"type"integer"nullabletrue)]
  82.     #[Assert\Length(min5max5)]
  83.     private ?int $zipCode;
  84.     #[ORM\Column(name"streetNumber"type"integer"nullabletrue)]
  85.     private ?int $streetNumber;
  86.     #[ORM\Column(name"address"type"string"length255nullabletrue)]
  87.     private ?string $address;
  88.     #[ORM\Column(name"contractNumber"type"string"length255nullabletrue)]
  89.     private ?string $contractNumber;
  90.     #[ORM\Column(name"deadline"type"datetime"nullabletrue)]
  91.     private ?DateTime $deadline;
  92.     #[Assert\Email()]
  93.     #[ORM\Column(type"string"length255nullabletrue)]
  94.     private ?string $contactEmail;
  95.     #[ORM\Column(type"string"length255nullabletrue)]
  96.     private ?string $cptNumber;
  97.     /**
  98.      * @AcmeAssert\FrenchPhoneNumber
  99.      */
  100.     #[ORM\Column(type"string"length255nullabletrue)]
  101.     private ?string $contactPhoneNumber;
  102.     #[Assert\Choice(callback"getCategories"multiplefalse)]
  103.     #[ORM\Column(type"string"length255nullabletrue)]
  104.     private ?string $category null;
  105.     #[ORM\Column(name"brokerageFirmName"type"string"length255nullabletrue)]
  106.     private ?string $brokerageFirmName;
  107.     #[Assert\Email()]
  108.     #[ORM\Column(name"brokerEmail"type"string"length255nullabletrue)]
  109.     private ?string $brokerEmail;
  110.     /**
  111.      * @Vich\UploadableField(mapping= "insuranceReceipt", fileNameProperty= "insuranceReceiptFileName", size= "insuranceReceiptFileSize")
  112.      */
  113.     private ?File $insuranceReceiptFile null;
  114.     #[ORM\Column(type"string"length255nullabletrue)]
  115.     private ?string $insuranceReceiptFileName null;
  116.     #[ORM\Column(type"integer"nullabletrue)]
  117.     private ?int $insuranceReceiptFileSize;
  118.     #[ORM\Column(type"datetime"nullabletrue)]
  119.     private ?DateTime $insuranceReceiptFileUpdatedAt;
  120.     /**
  121.      * @Vich\UploadableField(mapping= "insurance", fileNameProperty= "insuranceFileName", size= "insuranceFileSize")
  122.      */
  123.     private ?File $insuranceFile null;
  124.     #[ORM\Column(type"string"length255nullabletrue)]
  125.     private ?string $insuranceFileName null;
  126.     #[ORM\Column(type"integer"nullabletrue)]
  127.     private ?int $insuranceFileSize;
  128.     #[ORM\Column(type"datetime"nullabletrue)]
  129.     private ?DateTime $insuranceFileUpdatedAt;
  130.     #[ORM\Column(length255nullabletrue)]
  131.     private ?string $companyName null;
  132.     public function __construct()
  133.     {
  134.         $this->createdAt = new DateTime();
  135.     }
  136.     public static function getRelationTypes()
  137.     {
  138.         $arr = [
  139.             "Compagnie en direct" => "direct",
  140.             "Agent général de la compagnie" => "agent",
  141.             "Courtier en assurances" => "broker",
  142.             "Société de courtage en assurances" => "brokerCompany"
  143.         ];
  144.         return $arr;
  145.     }
  146.     public static function getCategories($hasMultiriskMainHouseInsurance false, ?string $type null)
  147.     {
  148.         $arr = [];
  149.         if ($type === null || $type === 'address') {
  150.             if (!$hasMultiriskMainHouseInsurance) {
  151.                 $arr["Domicile principal"] = "multiriskMainHouse";
  152.             }
  153.             $arr["Domicile secondaire"] = "multiriskSecondHouse";
  154.             $arr["Autre local"] = "multiriskOtherLocal";
  155.         }
  156.         if ($type === null || $type === 'vehicle') {
  157.             $arr["Véhicule"] = "vehicle";
  158.         }
  159.         if ($type === null || $type === 'item') {
  160.             $arr["Objets"] = "multiriskItems";
  161.             $arr["Objets"] = "otherContract";
  162.         }
  163.         return $arr;
  164.     }
  165.     /**
  166.      * If manually uploading a file (i.e. not using Symfony Form) ensure an instance
  167.      * of 'UploadedFile' is injected into this setter to trigger the  update. If this
  168.      * bundle's configuration parameter 'inject_on_load' is set to 'true' this setter
  169.      * must be able to accept an instance of 'File' as the bundle will inject one here
  170.      * during Doctrine hydration.
  171.      *
  172.      * @param File|\Symfony\Component\HttpFoundation\File\UploadedFile $image
  173.      */
  174.     public function setInsuranceFile(File $image null)
  175.     {
  176.         $this->insuranceFile $image;
  177.         if (null !== $image) {
  178.             // It is required that at least one field changes if you are using doctrine
  179.             // otherwise the event listeners won't be called and the file is lost
  180.             $this->insuranceFileUpdatedAt = new \DateTime();
  181.         }
  182.     }
  183.     public function getInsuranceFile()
  184.     {
  185.         return $this->insuranceFile;
  186.     }
  187.     /**
  188.      * If manually uploading a file (i.e. not using Symfony Form) ensure an instance
  189.      * of 'UploadedFile' is injected into this setter to trigger the  update. If this
  190.      * bundle's configuration parameter 'inject_on_load' is set to 'true' this setter
  191.      * must be able to accept an instance of 'File' as the bundle will inject one here
  192.      * during Doctrine hydration.
  193.      *
  194.      * @param File|\Symfony\Component\HttpFoundation\File\UploadedFile $image
  195.      */
  196.     public function setInsuranceReceiptFile(File $image null)
  197.     {
  198.         $this->insuranceReceiptFile $image;
  199.         if (null !== $image) {
  200.             // It is required that at least one field changes if you are using doctrine
  201.             // otherwise the event listeners won't be called and the file is lost
  202.             $this->insuranceReceiptFileUpdatedAt = new \DateTime();
  203.         }
  204.     }
  205.     public function getInsuranceReceiptFile()
  206.     {
  207.         return $this->insuranceReceiptFile;
  208.     }
  209.     /**
  210.      * Get id
  211.      *
  212.      * @return int
  213.      */
  214.     public function getId()
  215.     {
  216.         return $this->id;
  217.     }
  218.     /**
  219.      * Set contractNumber
  220.      *
  221.      * @param string $contractNumber
  222.      *
  223.      * @return Insurance
  224.      */
  225.     public function setContractNumber($contractNumber)
  226.     {
  227.         $this->contractNumber $contractNumber;
  228.         return $this;
  229.     }
  230.     /**
  231.      * Get contractNumber
  232.      *
  233.      * @return string
  234.      */
  235.     public function getContractNumber()
  236.     {
  237.         return $this->contractNumber;
  238.     }
  239.     /**
  240.      * Set deadline
  241.      *
  242.      * @param DateTime $deadline
  243.      *
  244.      * @return Insurance
  245.      */
  246.     public function setDeadline($deadline)
  247.     {
  248.         $this->deadline $deadline;
  249.         return $this;
  250.     }
  251.     /**
  252.      * Get deadline
  253.      *
  254.      * @return DateTime
  255.      */
  256.     public function getDeadline()
  257.     {
  258.         return $this->deadline;
  259.     }
  260.     /**
  261.      * Set category
  262.      *
  263.      * @param string $category
  264.      *
  265.      * @return Insurance
  266.      */
  267.     public function setCategory($category)
  268.     {
  269.         $this->category $category;
  270.         return $this;
  271.     }
  272.     /**
  273.      * Get category
  274.      *
  275.      * @return string
  276.      */
  277.     public function getCategory()
  278.     {
  279.         return $this->category;
  280.     }
  281.     /**
  282.      * Set brokerageFirmName
  283.      *
  284.      * @param string $brokerageFirmName
  285.      *
  286.      * @return Insurance
  287.      */
  288.     public function setBrokerageFirmName($brokerageFirmName)
  289.     {
  290.         $this->brokerageFirmName $brokerageFirmName;
  291.         return $this;
  292.     }
  293.     /**
  294.      * Get brokerageFirmName
  295.      *
  296.      * @return string
  297.      */
  298.     public function getBrokerageFirmName()
  299.     {
  300.         return $this->brokerageFirmName;
  301.     }
  302.     /**
  303.      * Set brokerEmail
  304.      *
  305.      * @param string $brokerEmail
  306.      *
  307.      * @return Insurance
  308.      */
  309.     public function setBrokerEmail($brokerEmail)
  310.     {
  311.         $this->brokerEmail $brokerEmail;
  312.         return $this;
  313.     }
  314.     /**
  315.      * Get brokerEmail
  316.      *
  317.      * @return string
  318.      */
  319.     public function getBrokerEmail()
  320.     {
  321.         return $this->brokerEmail;
  322.     }
  323.     /**
  324.      * Set createdAt
  325.      *
  326.      * @param DateTime $createdAt
  327.      *
  328.      * @return Insurance
  329.      */
  330.     public function setCreatedAt($createdAt)
  331.     {
  332.         $this->createdAt $createdAt;
  333.         return $this;
  334.     }
  335.     /**
  336.      * Get createdAt
  337.      *
  338.      * @return DateTime
  339.      */
  340.     public function getCreatedAt()
  341.     {
  342.         return $this->createdAt;
  343.     }
  344.     /**
  345.      * Set gmapsAddress
  346.      *
  347.      * @param string $gmapsAddress
  348.      *
  349.      * @return Insurance
  350.      */
  351.     public function setGmapsAddress($gmapsAddress)
  352.     {
  353.         $this->gmapsAddress $gmapsAddress;
  354.         return $this;
  355.     }
  356.     /**
  357.      * Get gmapsAddress
  358.      *
  359.      * @return string
  360.      */
  361.     public function getGmapsAddress()
  362.     {
  363.         return $this->gmapsAddress;
  364.     }
  365.     /**
  366.      * Set city
  367.      *
  368.      * @param string $city
  369.      *
  370.      * @return Insurance
  371.      */
  372.     public function setCity($city)
  373.     {
  374.         $this->city $city;
  375.         return $this;
  376.     }
  377.     /**
  378.      * Get city
  379.      *
  380.      * @return string
  381.      */
  382.     public function getCity()
  383.     {
  384.         return $this->city;
  385.     }
  386.     /**
  387.      * Set zipCode
  388.      *
  389.      * @param integer $zipCode
  390.      *
  391.      * @return Insurance
  392.      */
  393.     public function setZipCode($zipCode)
  394.     {
  395.         $this->zipCode $zipCode;
  396.         return $this;
  397.     }
  398.     /**
  399.      * Get zipCode
  400.      *
  401.      * @return integer
  402.      */
  403.     public function getZipCode()
  404.     {
  405.         return $this->zipCode;
  406.     }
  407.     /**
  408.      * Set streetNumber
  409.      *
  410.      * @param integer $streetNumber
  411.      *
  412.      * @return Insurance
  413.      */
  414.     public function setStreetNumber($streetNumber)
  415.     {
  416.         $this->streetNumber $streetNumber;
  417.         return $this;
  418.     }
  419.     /**
  420.      * Get streetNumber
  421.      *
  422.      * @return integer
  423.      */
  424.     public function getStreetNumber()
  425.     {
  426.         return $this->streetNumber;
  427.     }
  428.     /**
  429.      * Set address
  430.      *
  431.      * @param string $address
  432.      *
  433.      * @return Insurance
  434.      */
  435.     public function setAddress($address)
  436.     {
  437.         $this->address $address;
  438.         return $this;
  439.     }
  440.     /**
  441.      * Get address
  442.      *
  443.      * @return string
  444.      */
  445.     public function getAddress()
  446.     {
  447.         return $this->address;
  448.     }
  449.     /**
  450.      * Set insuranceFileName
  451.      *
  452.      * @param string $insuranceFileName
  453.      *
  454.      * @return Insurance
  455.      */
  456.     public function setInsuranceFileName($insuranceFileName)
  457.     {
  458.         $this->insuranceFileName $insuranceFileName;
  459.         return $this;
  460.     }
  461.     /**
  462.      * Get insuranceFileName
  463.      *
  464.      * @return string
  465.      */
  466.     public function getInsuranceFileName()
  467.     {
  468.         return $this->insuranceFileName;
  469.     }
  470.     /**
  471.      * Set insuranceFileSize
  472.      *
  473.      * @param integer $insuranceFileSize
  474.      *
  475.      * @return Insurance
  476.      */
  477.     public function setInsuranceFileSize($insuranceFileSize)
  478.     {
  479.         $this->insuranceFileSize $insuranceFileSize;
  480.         return $this;
  481.     }
  482.     /**
  483.      * Get insuranceFileSize
  484.      *
  485.      * @return integer
  486.      */
  487.     public function getInsuranceFileSize()
  488.     {
  489.         return $this->insuranceFileSize;
  490.     }
  491.     /**
  492.      * Set insuranceFileUpdatedAt
  493.      *
  494.      * @param DateTime $insuranceFileUpdatedAt
  495.      *
  496.      * @return Insurance
  497.      */
  498.     public function setInsuranceFileUpdatedAt($insuranceFileUpdatedAt)
  499.     {
  500.         $this->insuranceFileUpdatedAt $insuranceFileUpdatedAt;
  501.         return $this;
  502.     }
  503.     /**
  504.      * Get insuranceFileUpdatedAt
  505.      *
  506.      * @return DateTime
  507.      */
  508.     public function getInsuranceFileUpdatedAt()
  509.     {
  510.         return $this->insuranceFileUpdatedAt;
  511.     }
  512.     /**
  513.      * Set user
  514.      *
  515.      * @param User $user
  516.      *
  517.      * @return Insurance
  518.      */
  519.     public function setUser(User $user)
  520.     {
  521.         $this->user $user;
  522.         return $this;
  523.     }
  524.     /**
  525.      * Get user
  526.      *
  527.      * @return User|null
  528.      */
  529.     public function getUser(): ?User
  530.     {
  531.         return $this->user;
  532.     }
  533.     /**
  534.      * Add complaintLetter
  535.      *
  536.      * @param \App\Entity\ComplaintLetter $complaintLetter
  537.      *
  538.      * @return Insurance
  539.      */
  540.     public function addComplaintLetter(\App\Entity\ComplaintLetter $complaintLetter)
  541.     {
  542.         $this->complaintLetters[] = $complaintLetter;
  543.         return $this;
  544.     }
  545.     /**
  546.      * Remove complaintLetter
  547.      *
  548.      * @param \App\Entity\ComplaintLetter $complaintLetter
  549.      */
  550.     public function removeComplaintLetter(\App\Entity\ComplaintLetter $complaintLetter)
  551.     {
  552.         $this->complaintLetters->removeElement($complaintLetter);
  553.     }
  554.     /**
  555.      * Get complaintLetters
  556.      *
  557.      * @return \Doctrine\Common\Collections\Collection
  558.      */
  559.     public function getComplaintLetters()
  560.     {
  561.         return $this->complaintLetters;
  562.     }
  563.     /**
  564.      * Add disasterDeclaration
  565.      *
  566.      * @param \App\Entity\DisasterDeclaration $disasterDeclaration
  567.      *
  568.      * @return Insurance
  569.      */
  570.     public function addDisasterDeclaration(\App\Entity\DisasterDeclaration $disasterDeclaration)
  571.     {
  572.         $this->disasterDeclarations[] = $disasterDeclaration;
  573.         return $this;
  574.     }
  575.     /**
  576.      * Remove disasterDeclaration
  577.      *
  578.      * @param \App\Entity\DisasterDeclaration $disasterDeclaration
  579.      */
  580.     public function removeDisasterDeclaration(\App\Entity\DisasterDeclaration $disasterDeclaration)
  581.     {
  582.         $this->disasterDeclarations->removeElement($disasterDeclaration);
  583.     }
  584.     /**
  585.      * Get disasterDeclarations
  586.      *
  587.      * @return \Doctrine\Common\Collections\Collection
  588.      */
  589.     public function getDisasterDeclarations()
  590.     {
  591.         return $this->disasterDeclarations;
  592.     }
  593.     /**
  594.      * Set companyEmail
  595.      *
  596.      * @param string $companyEmail
  597.      *
  598.      * @return Insurance
  599.      */
  600.     public function setCompanyEmail($companyEmail)
  601.     {
  602.         $this->companyEmail $companyEmail;
  603.         return $this;
  604.     }
  605.     /**
  606.      * Get companyEmail
  607.      *
  608.      * @return string
  609.      */
  610.     public function getCompanyEmail()
  611.     {
  612.         return $this->companyEmail;
  613.     }
  614.     /**
  615.      * Set isDeleted
  616.      *
  617.      * @param boolean $isDeleted
  618.      *
  619.      * @return Insurance
  620.      */
  621.     public function setIsDeleted($isDeleted)
  622.     {
  623.         $this->isDeleted $isDeleted;
  624.         return $this;
  625.     }
  626.     /**
  627.      * Get isDeleted
  628.      *
  629.      * @return boolean
  630.      */
  631.     public function getIsDeleted()
  632.     {
  633.         return $this->isDeleted;
  634.     }
  635.     /**
  636.      * Set contactEmail
  637.      *
  638.      * @param string $contactEmail
  639.      *
  640.      * @return Insurance
  641.      */
  642.     public function setContactEmail($contactEmail)
  643.     {
  644.         $this->contactEmail $contactEmail;
  645.         return $this;
  646.     }
  647.     /**
  648.      * Get contactEmail
  649.      *
  650.      * @return string
  651.      */
  652.     public function getContactEmail()
  653.     {
  654.         return $this->contactEmail;
  655.     }
  656.     /**
  657.      * Set cptNumber
  658.      *
  659.      * @param string $cptNumber
  660.      *
  661.      * @return Insurance
  662.      */
  663.     public function setCptNumber($cptNumber)
  664.     {
  665.         $this->cptNumber $cptNumber;
  666.         return $this;
  667.     }
  668.     /**
  669.      * Get cptNumber
  670.      *
  671.      * @return string
  672.      */
  673.     public function getCptNumber()
  674.     {
  675.         return $this->cptNumber;
  676.     }
  677.     /**
  678.      * Set contactPhoneNumber
  679.      *
  680.      * @param string $contactPhoneNumber
  681.      *
  682.      * @return Insurance
  683.      */
  684.     public function setContactPhoneNumber($contactPhoneNumber)
  685.     {
  686.         $this->contactPhoneNumber $contactPhoneNumber;
  687.         return $this;
  688.     }
  689.     /**
  690.      * Get contactPhoneNumber
  691.      *
  692.      * @return string
  693.      */
  694.     public function getContactPhoneNumber()
  695.     {
  696.         return $this->contactPhoneNumber;
  697.     }
  698.     /**
  699.      * Set insuranceReceiptFileName
  700.      *
  701.      * @param string $insuranceReceiptFileName
  702.      *
  703.      * @return Insurance
  704.      */
  705.     public function setInsuranceReceiptFileName($insuranceReceiptFileName)
  706.     {
  707.         $this->insuranceReceiptFileName $insuranceReceiptFileName;
  708.         return $this;
  709.     }
  710.     /**
  711.      * Get insuranceReceiptFileName
  712.      *
  713.      * @return string
  714.      */
  715.     public function getInsuranceReceiptFileName()
  716.     {
  717.         return $this->insuranceReceiptFileName;
  718.     }
  719.     /**
  720.      * Set insuranceReceiptFileSize
  721.      *
  722.      * @param integer $insuranceReceiptFileSize
  723.      *
  724.      * @return Insurance
  725.      */
  726.     public function setInsuranceReceiptFileSize($insuranceReceiptFileSize)
  727.     {
  728.         $this->insuranceReceiptFileSize $insuranceReceiptFileSize;
  729.         return $this;
  730.     }
  731.     /**
  732.      * Get insuranceReceiptFileSize
  733.      *
  734.      * @return integer
  735.      */
  736.     public function getInsuranceReceiptFileSize()
  737.     {
  738.         return $this->insuranceReceiptFileSize;
  739.     }
  740.     /**
  741.      * Set insuranceReceiptFileUpdatedAt
  742.      *
  743.      * @param DateTime $insuranceReceiptFileUpdatedAt
  744.      *
  745.      * @return Insurance
  746.      */
  747.     public function setInsuranceReceiptFileUpdatedAt($insuranceReceiptFileUpdatedAt)
  748.     {
  749.         $this->insuranceReceiptFileUpdatedAt $insuranceReceiptFileUpdatedAt;
  750.         return $this;
  751.     }
  752.     /**
  753.      * Get insuranceReceiptFileUpdatedAt
  754.      *
  755.      * @return DateTime
  756.      */
  757.     public function getInsuranceReceiptFileUpdatedAt()
  758.     {
  759.         return $this->insuranceReceiptFileUpdatedAt;
  760.     }
  761.     /**
  762.      * Set otherContract
  763.      *
  764.      * @param string $otherContract
  765.      *
  766.      * @return Insurance
  767.      */
  768.     public function setOtherContract($otherContract)
  769.     {
  770.         $this->otherContract $otherContract;
  771.         return $this;
  772.     }
  773.     /**
  774.      * Get otherContract
  775.      *
  776.      * @return string
  777.      */
  778.     public function getOtherContract()
  779.     {
  780.         return $this->otherContract;
  781.     }
  782.     /**
  783.      * Add complaintX
  784.      *
  785.      * @param \App\Entity\ComplaintX $complaintX
  786.      *
  787.      * @return Insurance
  788.      */
  789.     public function addComplaintX(\App\Entity\ComplaintX $complaintX)
  790.     {
  791.         $this->complaintXs[] = $complaintX;
  792.         return $this;
  793.     }
  794.     /**
  795.      * Remove complaintX
  796.      *
  797.      * @param \App\Entity\ComplaintX $complaintX
  798.      */
  799.     public function removeComplaintX(\App\Entity\ComplaintX $complaintX)
  800.     {
  801.         $this->complaintXs->removeElement($complaintX);
  802.     }
  803.     /**
  804.      * Get complaintXs
  805.      *
  806.      * @return \Doctrine\Common\Collections\Collection
  807.      */
  808.     public function getComplaintXs()
  809.     {
  810.         return $this->complaintXs;
  811.     }
  812.     /**
  813.      * Set item
  814.      *
  815.      * @param Item $item
  816.      *
  817.      * @return Insurance
  818.      */
  819.     public function setItem(Item $item null)
  820.     {
  821.         $this->item $item;
  822.         return $this;
  823.     }
  824.     /**
  825.      * Get item
  826.      *
  827.      * @return Item|null
  828.      */
  829.     public function getItem(): ?Item
  830.     {
  831.         return $this->item && $this->item->getIsDeleted() === false $this->item null;
  832.     }
  833.     /**
  834.      * Set vehicle
  835.      *
  836.      * @param Vehicle $vehicle
  837.      *
  838.      * @return Insurance
  839.      */
  840.     public function setVehicle(Vehicle $vehicle null)
  841.     {
  842.         $this->vehicle $vehicle;
  843.         return $this;
  844.     }
  845.     /**
  846.      * Get vehicle
  847.      *
  848.      * @return Vehicle|null
  849.      */
  850.     public function getVehicle(): ?Vehicle
  851.     {
  852.         return $this->vehicle && $this->vehicle->getIsDeleted() === false $this->vehicle null;
  853.     }
  854.     /**
  855.      * Set relationType.
  856.      *
  857.      * @param string|null $relationType
  858.      *
  859.      * @return Insurance
  860.      */
  861.     public function setRelationType($relationType null)
  862.     {
  863.         $this->relationType $relationType;
  864.         return $this;
  865.     }
  866.     /**
  867.      * Get relationType.
  868.      *
  869.      * @return string|null
  870.      */
  871.     public function getRelationType()
  872.     {
  873.         return $this->relationType;
  874.     }
  875.     /**
  876.      * Set insuranceMoreName.
  877.      *
  878.      * @param string|null $insuranceMoreName
  879.      *
  880.      * @return Insurance
  881.      */
  882.     public function setInsuranceMoreName($insuranceMoreName null)
  883.     {
  884.         $this->insuranceMoreName $insuranceMoreName;
  885.         return $this;
  886.     }
  887.     /**
  888.      * Get insuranceMoreName.
  889.      *
  890.      * @return string|null
  891.      */
  892.     public function getInsuranceMoreName()
  893.     {
  894.         return $this->insuranceMoreName;
  895.     }
  896.     /**
  897.      * Set insuranceMoreAddress.
  898.      *
  899.      * @param string|null $insuranceMoreAddress
  900.      *
  901.      * @return Insurance
  902.      */
  903.     public function setInsuranceMoreAddress($insuranceMoreAddress null)
  904.     {
  905.         $this->insuranceMoreAddress $insuranceMoreAddress;
  906.         return $this;
  907.     }
  908.     /**
  909.      * Get insuranceMoreAddress.
  910.      *
  911.      * @return string|null
  912.      */
  913.     public function getInsuranceMoreAddress()
  914.     {
  915.         return $this->insuranceMoreAddress;
  916.     }
  917.     /**
  918.      * Set relationMoreName.
  919.      *
  920.      * @param string|null $relationMoreName
  921.      *
  922.      * @return Insurance
  923.      */
  924.     public function setRelationMoreName($relationMoreName null)
  925.     {
  926.         $this->relationMoreName $relationMoreName;
  927.         return $this;
  928.     }
  929.     /**
  930.      * Get relationMoreName.
  931.      *
  932.      * @return string|null
  933.      */
  934.     public function getRelationMoreName()
  935.     {
  936.         return $this->relationMoreName;
  937.     }
  938.     /**
  939.      * Set relationMoreAddress.
  940.      *
  941.      * @param string|null $relationMoreAddress
  942.      *
  943.      * @return Insurance
  944.      */
  945.     public function setRelationMoreAddress($relationMoreAddress null)
  946.     {
  947.         $this->relationMoreAddress $relationMoreAddress;
  948.         return $this;
  949.     }
  950.     /**
  951.      * Get relationMoreAddress.
  952.      *
  953.      * @return string|null
  954.      */
  955.     public function getRelationMoreAddress()
  956.     {
  957.         return $this->relationMoreAddress;
  958.     }
  959.     /**
  960.      * Set insuranceMoreStreetNumber.
  961.      *
  962.      * @param string|null $insuranceMoreStreetNumber
  963.      *
  964.      * @return Insurance
  965.      */
  966.     public function setInsuranceMoreStreetNumber($insuranceMoreStreetNumber null)
  967.     {
  968.         $this->insuranceMoreStreetNumber $insuranceMoreStreetNumber;
  969.         return $this;
  970.     }
  971.     /**
  972.      * Get insuranceMoreStreetNumber.
  973.      *
  974.      * @return string|null
  975.      */
  976.     public function getInsuranceMoreStreetNumber()
  977.     {
  978.         return $this->insuranceMoreStreetNumber;
  979.     }
  980.     /**
  981.      * Set insuranceMoreRoadName.
  982.      *
  983.      * @param string|null $insuranceMoreRoadName
  984.      *
  985.      * @return Insurance
  986.      */
  987.     public function setInsuranceMoreRoadName($insuranceMoreRoadName null)
  988.     {
  989.         $this->insuranceMoreRoadName $insuranceMoreRoadName;
  990.         return $this;
  991.     }
  992.     /**
  993.      * Get insuranceMoreRoadName.
  994.      *
  995.      * @return string|null
  996.      */
  997.     public function getInsuranceMoreRoadName()
  998.     {
  999.         return $this->insuranceMoreRoadName;
  1000.     }
  1001.     /**
  1002.      * Set insuranceMoreZipCode.
  1003.      *
  1004.      * @param string|null $insuranceMoreZipCode
  1005.      *
  1006.      * @return Insurance
  1007.      */
  1008.     public function setInsuranceMoreZipCode($insuranceMoreZipCode null)
  1009.     {
  1010.         $this->insuranceMoreZipCode $insuranceMoreZipCode;
  1011.         return $this;
  1012.     }
  1013.     /**
  1014.      * Get insuranceMoreZipCode.
  1015.      *
  1016.      * @return string|null
  1017.      */
  1018.     public function getInsuranceMoreZipCode()
  1019.     {
  1020.         return $this->insuranceMoreZipCode;
  1021.     }
  1022.     /**
  1023.      * Set insuranceMoreCity.
  1024.      *
  1025.      * @param string|null $insuranceMoreCity
  1026.      *
  1027.      * @return Insurance
  1028.      */
  1029.     public function setInsuranceMoreCity($insuranceMoreCity null)
  1030.     {
  1031.         $this->insuranceMoreCity $insuranceMoreCity;
  1032.         return $this;
  1033.     }
  1034.     /**
  1035.      * Get insuranceMoreCity.
  1036.      *
  1037.      * @return string|null
  1038.      */
  1039.     public function getInsuranceMoreCity()
  1040.     {
  1041.         return $this->insuranceMoreCity;
  1042.     }
  1043.     /**
  1044.      * Set insuranceRelationStreetNumber.
  1045.      *
  1046.      * @param string|null $insuranceRelationStreetNumber
  1047.      *
  1048.      * @return Insurance
  1049.      */
  1050.     public function setInsuranceRelationStreetNumber($insuranceRelationStreetNumber null)
  1051.     {
  1052.         $this->insuranceRelationStreetNumber $insuranceRelationStreetNumber;
  1053.         return $this;
  1054.     }
  1055.     /**
  1056.      * Get insuranceRelationStreetNumber.
  1057.      *
  1058.      * @return string|null
  1059.      */
  1060.     public function getInsuranceRelationStreetNumber()
  1061.     {
  1062.         return $this->insuranceRelationStreetNumber;
  1063.     }
  1064.     /**
  1065.      * Set insuranceRelationRoadName.
  1066.      *
  1067.      * @param string|null $insuranceRelationRoadName
  1068.      *
  1069.      * @return Insurance
  1070.      */
  1071.     public function setInsuranceRelationRoadName($insuranceRelationRoadName null)
  1072.     {
  1073.         $this->insuranceRelationRoadName $insuranceRelationRoadName;
  1074.         return $this;
  1075.     }
  1076.     /**
  1077.      * Get insuranceRelationRoadName.
  1078.      *
  1079.      * @return string|null
  1080.      */
  1081.     public function getInsuranceRelationRoadName()
  1082.     {
  1083.         return $this->insuranceRelationRoadName;
  1084.     }
  1085.     /**
  1086.      * Set insuranceRelationZipCode.
  1087.      *
  1088.      * @param string|null $insuranceRelationZipCode
  1089.      *
  1090.      * @return Insurance
  1091.      */
  1092.     public function setInsuranceRelationZipCode($insuranceRelationZipCode null)
  1093.     {
  1094.         $this->insuranceRelationZipCode $insuranceRelationZipCode;
  1095.         return $this;
  1096.     }
  1097.     /**
  1098.      * Get insuranceRelationZipCode.
  1099.      *
  1100.      * @return string|null
  1101.      */
  1102.     public function getInsuranceRelationZipCode()
  1103.     {
  1104.         return $this->insuranceRelationZipCode;
  1105.     }
  1106.     /**
  1107.      * Set insuranceRelationCity.
  1108.      *
  1109.      * @param string|null $insuranceRelationCity
  1110.      *
  1111.      * @return Insurance
  1112.      */
  1113.     public function setInsuranceRelationCity($insuranceRelationCity null)
  1114.     {
  1115.         $this->insuranceRelationCity $insuranceRelationCity;
  1116.         return $this;
  1117.     }
  1118.     /**
  1119.      * Get insuranceRelationCity.
  1120.      *
  1121.      * @return string|null
  1122.      */
  1123.     public function getInsuranceRelationCity()
  1124.     {
  1125.         return $this->insuranceRelationCity;
  1126.     }
  1127.     /**
  1128.      * Set relationMoreStreetNumber.
  1129.      *
  1130.      * @param string|null $relationMoreStreetNumber
  1131.      *
  1132.      * @return Insurance
  1133.      */
  1134.     public function setRelationMoreStreetNumber($relationMoreStreetNumber null)
  1135.     {
  1136.         $this->relationMoreStreetNumber $relationMoreStreetNumber;
  1137.         return $this;
  1138.     }
  1139.     /**
  1140.      * Get relationMoreStreetNumber.
  1141.      *
  1142.      * @return string|null
  1143.      */
  1144.     public function getRelationMoreStreetNumber()
  1145.     {
  1146.         return $this->relationMoreStreetNumber;
  1147.     }
  1148.     /**
  1149.      * Set relationMoreRoadName.
  1150.      *
  1151.      * @param string|null $relationMoreRoadName
  1152.      *
  1153.      * @return Insurance
  1154.      */
  1155.     public function setRelationMoreRoadName($relationMoreRoadName null)
  1156.     {
  1157.         $this->relationMoreRoadName $relationMoreRoadName;
  1158.         return $this;
  1159.     }
  1160.     /**
  1161.      * Get relationMoreRoadName.
  1162.      *
  1163.      * @return string|null
  1164.      */
  1165.     public function getRelationMoreRoadName()
  1166.     {
  1167.         return $this->relationMoreRoadName;
  1168.     }
  1169.     /**
  1170.      * Set relationMoreZipCode.
  1171.      *
  1172.      * @param string|null $relationMoreZipCode
  1173.      *
  1174.      * @return Insurance
  1175.      */
  1176.     public function setRelationMoreZipCode($relationMoreZipCode null)
  1177.     {
  1178.         $this->relationMoreZipCode $relationMoreZipCode;
  1179.         return $this;
  1180.     }
  1181.     /**
  1182.      * Get relationMoreZipCode.
  1183.      *
  1184.      * @return string|null
  1185.      */
  1186.     public function getRelationMoreZipCode()
  1187.     {
  1188.         return $this->relationMoreZipCode;
  1189.     }
  1190.     /**
  1191.      * Set relationMoreCity.
  1192.      *
  1193.      * @param string|null $relationMoreCity
  1194.      *
  1195.      * @return Insurance
  1196.      */
  1197.     public function setRelationMoreCity($relationMoreCity null)
  1198.     {
  1199.         $this->relationMoreCity $relationMoreCity;
  1200.         return $this;
  1201.     }
  1202.     /**
  1203.      * Get relationMoreCity.
  1204.      *
  1205.      * @return string|null
  1206.      */
  1207.     public function getRelationMoreCity()
  1208.     {
  1209.         return $this->relationMoreCity;
  1210.     }
  1211.     /**
  1212.      * Set insuranceCompany.
  1213.      *
  1214.      * @param \App\Entity\InsuranceCompany|null $insuranceCompany
  1215.      *
  1216.      * @return Insurance
  1217.      */
  1218.     public function setInsuranceCompany(\App\Entity\InsuranceCompany $insuranceCompany null)
  1219.     {
  1220.         $this->insuranceCompany $insuranceCompany;
  1221.         return $this;
  1222.     }
  1223.     /**
  1224.      * Get insuranceCompany.
  1225.      *
  1226.      * @return \App\Entity\InsuranceCompany|null
  1227.      */
  1228.     public function getInsuranceCompany()
  1229.     {
  1230.         return $this->insuranceCompany;
  1231.     }
  1232.     /**
  1233.      * Set addressInsurance.
  1234.      *
  1235.      * @param Address|null $addressInsurance
  1236.      *
  1237.      * @return Insurance
  1238.      */
  1239.     public function setAddressInsurance(Address $addressInsurance null)
  1240.     {
  1241.         $this->addressInsurance $addressInsurance;
  1242.         return $this;
  1243.     }
  1244.     /**
  1245.      * Get addressInsurance.
  1246.      *
  1247.      * @return Address|null
  1248.      */
  1249.     public function getAddressInsurance(): ?Address
  1250.     {
  1251.         return $this->addressInsurance && $this->addressInsurance->getIsDeleted() === false $this->addressInsurance null;
  1252.     }
  1253.     public function getCompanyName(): ?string
  1254.     {
  1255.         return $this->companyName;
  1256.     }
  1257.     public function setCompanyName(?string $companyName): static
  1258.     {
  1259.         $this->companyName $companyName;
  1260.         return $this;
  1261.     }
  1262. }