src/Entity/Flat.php line 33

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Entity\Building;
  4. use App\Entity\PollOption;
  5. use App\Entity\User;
  6. use DateTime;
  7. use Doctrine\Common\Collections\ArrayCollection;
  8. use Doctrine\Common\Collections\Collection;
  9. use Doctrine\ORM\Mapping as ORM;
  10. use Symfony\Component\Serializer\Annotation\Ignore;
  11. use Symfony\Component\Validator\Constraints as Assert;
  12. use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  13. /**
  14.  * Flat
  15.  *
  16.  * @ORM\Table(
  17.  *     name="flat",
  18.  *     uniqueConstraints={@ORM\UniqueConstraint(
  19.  *      name="uniq_user_id_building_id_display_flat_id",
  20.  *      columns={"user_id","building_id","display_flat_id"})}
  21.  *
  22.  * )
  23.  * @ORM\Entity(repositoryClass="App\Repository\FlatRepository")
  24.  * @UniqueEntity(
  25.  *     fields= {"user", "building", "displayFlatId"},
  26.  *     errorPath="display_flat_id",
  27.  *     message="Stambena jedinica sa ovom oznakom već postoji."
  28.  * )
  29.  */
  30. class Flat
  31. {
  32.     /**
  33.      * @var array<string>
  34.      */
  35.     #[Ignore]
  36.     public static array $DATATABLE_ORDER = [
  37.         'displayFlatId',
  38.         'ownerName',
  39.         'address',
  40.         'ownerPhoneNumber',
  41.         'size',
  42.         'debit',
  43.         'previousBill',
  44.         'oldDebit',
  45.         'ownerEmail',
  46.     ];
  47.     /**
  48.      * @ORM\Column(name="id", type="integer")
  49.      * @ORM\Id
  50.      * @ORM\GeneratedValue(strategy="AUTO")
  51.      */
  52.     private int $id;
  53.     /**
  54.      * @Assert\Length(
  55.      *     max = 11,
  56.      *     maxMessage = "Broj stana treba da ima maksimalno {{ limit }} karaktera."
  57.      * )
  58.      *
  59.      * @ORM\Column(name="display_flat_id", type="string", length=32, nullable=false)
  60.      */
  61.     private string $displayFlatId;
  62.     /**
  63.      * @Assert\Type(
  64.      *     type="float",
  65.      *     message="Vrednost {{ value }} nije validna. Očekivana je decimalna vrednost."
  66.      * )
  67.      * @ORM\Column(name="size", type="float", length=32, nullable=true, options={"default" : 0})
  68.      */
  69.     private float|null $size;
  70.     /**
  71.      * @ORM\Column(name="owner_name", type="string", length=512, nullable=true)
  72.      */
  73.     private string|null $ownerName;
  74.     /**
  75.      * @ORM\Column(name="owner_lastname", type="string", length=512, nullable=true)
  76.      */
  77.     private string|null $ownerLastname;
  78.     /**
  79.      * @ORM\Column(name="owner_address", type="string", length=512, nullable=true)
  80.      */
  81.     private string|null $ownerAddress;
  82.     /**
  83.      * @ORM\Column(name="owner_contact", type="string", length=512, nullable=true)
  84.      */
  85.     private string|null $ownerContact null;
  86.     /**
  87.      * @ORM\Column(name="owner_phone_number", type="string", nullable=true)
  88.      */
  89.     private string|null $ownerPhoneNumber null;
  90.     /**
  91.      * @ORM\Column(name="rent", type="boolean", nullable=true, options={"default" : false})
  92.      */
  93.     private bool|null $rent;
  94.     /**
  95.      * @ORM\Column(name="debit", type="float", nullable=false, options={"default" : 0})
  96.      */
  97.     private float $debit 0.0;
  98.     /**
  99.      * @ORM\Column(name="previous_bill", type="float", nullable=true, options={"default" : 0})
  100.      */
  101.     private float|null $previousBill 0.0;
  102.     /**
  103.      * @ORM\Column(name="type", type="integer", nullable=true, options={"default" : 1})
  104.      */
  105.     private int|null $type;
  106.     /**
  107.      * @ORM\Column(name="subType", type="integer", nullable=true, options={"default" : 1})
  108.      */
  109.     private int|null $subType null;
  110.     /**
  111.      * @ORM\Column(name="old_debit", type="float", nullable=true, options={"default" : 0})
  112.      */
  113.     private float|null $oldDebit 0.0;
  114.     /**
  115.      * @ORM\Column(name="comment", type="string", length=512, nullable=true)
  116.      */
  117.     private string|null $comment;
  118.     /**
  119.      * @Assert\Type(
  120.      *     type="integer",
  121.      *     message="The value {{ value }} is not a valid {{ type }}."
  122.      * )
  123.      * @ORM\Column(name="members", type="integer", options={"default" = 1})
  124.      */
  125.     private int $members;
  126.     /**
  127.      * @ORM\Column(name="created_at", type="datetime")
  128.      */
  129.     private DateTime|null $createdAt null;
  130.     /**
  131.      * @ORM\Column(name="updated_at", type="datetime")
  132.      */
  133.     private DateTime|null $updatedAt;
  134.     /**
  135.      * @Assert\Length(
  136.      *      max = 128,
  137.      *      maxMessage = "Naziv firme treba da ima maksimalno {{ limit }} karaktera."
  138.      * )
  139.      * @ORM\Column(name="company_name", type="string", length=128, nullable=true)
  140.      */
  141.     private string|null $companyName;
  142.     /**
  143.      * @ORM\Column(name="mat_id", type="string", length=64, nullable=true)
  144.      */
  145.     private string|null $matId;
  146.     /**
  147.      * @ORM\Column(name="pib", type="string", length=64, nullable=true)
  148.      */
  149.     private string|null $pib;
  150.     /**
  151.      * @ORM\ManyToOne(targetEntity="App\Entity\User")
  152.      * @ORM\JoinColumns({
  153.      *   @ORM\JoinColumn(name="user_id", referencedColumnName="id", nullable=false)
  154.      * })
  155.      */
  156.     #[Ignore]
  157.     private User $user;
  158.     /**
  159.      * @ORM\ManyToOne(targetEntity="App\Entity\Building", cascade={"persist"})
  160.      * @ORM\JoinColumns({
  161.      *   @ORM\JoinColumn(name="building_id", referencedColumnName="id", nullable=false, onDelete="CASCADE")
  162.      * })
  163.      */
  164.     #[Ignore]
  165.     private Building $building;
  166.     /**
  167.      * @Assert\Email(message = "'{{ value }}' nije validna email adresa.")
  168.      *
  169.      * @ORM\Column(name="owner_email", type="string", nullable=true)
  170.      */
  171.     private string|null $ownerEmail null;
  172.     /**
  173.      * @ORM\Column(name="email_can_be_used", type="boolean", options={"default" : true})
  174.      */
  175.     private bool $emailCanBeUsed;
  176.     /**
  177.      * @ORM\Column(name="company_place", type="string", length=64, nullable=true)
  178.      */
  179.     private string|null $companyPlace;
  180.     /**
  181.      * @ORM\Column(name="occupant", type="string", length=255, nullable=true)
  182.      */
  183.     private string|null $occupant;
  184.     /**
  185.      * @Assert\Email(message = "'{{ value }}' nije validna email adresa.")
  186.      *
  187.      * @ORM\Column(name="occupantEmail", type="string", length=255, nullable=true)
  188.      */
  189.     private string|null $occupantEmail;
  190.     /**
  191.      * @ORM\Column(name="archived", type="integer", nullable=true, options={"default" : 0})
  192.      */
  193.     private int|null $archived;
  194.     /**
  195.      * @ORM\Column(name="archived_at", type="datetime", nullable=true)
  196.      */
  197.     private DateTime $archivedAt;
  198.     /**
  199.      * @ORM\Column(name="bank_account", type="string", length=128, nullable=true)
  200.      */
  201.     private string|null $bankAccount;
  202.     /**
  203.      * @ORM\ManyToOne(targetEntity="App\Entity\Flat", cascade={"persist"})
  204.      * @ORM\JoinColumns({
  205.      *   @ORM\JoinColumn(name="current_flat", referencedColumnName="id", nullable=true, onDelete="CASCADE")
  206.      * })
  207.      */
  208.     #[Ignore]
  209.     private Flat|null $currentFlat;
  210.     /**
  211.      * @var Collection<int, FlatWarning>
  212.      * @ORM\OneToMany(targetEntity="App\Entity\FlatWarning", mappedBy="flat")
  213.      */
  214.     #[Ignore]
  215.     private Collection $flatWarnings;
  216.     /**
  217.      * @ORM\Column(name="createdBy", type="string", nullable=true)
  218.      */
  219.     private string|null $createdBy;
  220.     /**
  221.      * @var Collection<int, PollOption>
  222.      * @ORM\ManyToMany(targetEntity="App\Entity\PollOption", mappedBy="pollOptionsFlats")
  223.      */
  224.     #[Ignore]
  225.     private Collection $votedOptions;
  226.     /**
  227.      * @ORM\Column(name="eInvoice", type="boolean")
  228.      */
  229.     private bool $eInvoice false;
  230.     /**
  231.      * @ORM\Column(name="jbkjs", type="string", nullable=true)
  232.      */
  233.     private string|null $jbkjs null;
  234.     /**
  235.      * @ORM\Column(name="contract_number", type="string", nullable=true)
  236.      */
  237.     private string|null $contractNumber null;
  238.     /**
  239.      * @ORM\Column(name="order_number", type="string", nullable=true)
  240.      */
  241.     private string|null $orderNumber null;
  242.     /**
  243.      * @ORM\Column(name="object_code", type="string", nullable=true)
  244.      */
  245.     private string|null $objectCode null;
  246.     /**
  247.      * @ORM\ManyToOne(targetEntity="App\Entity\Resident", inversedBy="flats")
  248.      * @ORM\JoinColumns({
  249.      *   @ORM\JoinColumn(name="resident_id", referencedColumnName="id", onDelete="SET NULL")
  250.      * })
  251.      */
  252.     #[Ignore]
  253.     private Resident|null $resident;
  254.     /**
  255.      * @ORM\Column(name="print_bill", type="boolean")
  256.      */
  257.     private bool $printBill false;
  258.     /**
  259.      * @ORM\Column(name="old_debit_date", type="datetime", nullable=true)
  260.      */
  261.     private DateTime|null $oldDebitDate null;
  262.     /**
  263.      * @return string
  264.      */
  265.     public function getCreatedBy(): string
  266.     {
  267.         return $this->createdBy;
  268.     }
  269.     /**
  270.      * @return string|null
  271.      */
  272.     public function getOwnerEmail(): ?string
  273.     {
  274.         return $this->ownerEmail;
  275.     }
  276.     /**
  277.      * @param string|null $ownerEmail
  278.      */
  279.     public function setOwnerEmail(?string $ownerEmail): void
  280.     {
  281.         $this->ownerEmail $ownerEmail;
  282.     }
  283.     public function __construct()
  284.     {
  285.         if (empty($this->getDebit())) {
  286.             $this->setDebit(0.0);
  287.         }
  288.         $this->incrementCreatedAt();
  289.         $this->flatWarnings = new ArrayCollection();
  290.         $this->votedOptions = new ArrayCollection();
  291.     }
  292.     /**
  293.      * @param PollOption $option
  294.      */
  295.     public function addPollOption(PollOption $option): void
  296.     {
  297.         $this->votedOptions[] = $option;
  298.         $option->addFlatVote($this);
  299.     }
  300.     public function removePollOption(PollOption $option): void
  301.     {
  302.         if (!$this->votedOptions->contains($option)) {
  303.             return;
  304.         }
  305.         $this->votedOptions->removeElement($option);
  306.         $option->removeFlatVote($this);
  307.     }
  308.     /**
  309.      * Get id
  310.      *
  311.      * @return int
  312.      */
  313.     public function getId(): int
  314.     {
  315.         return $this->id;
  316.     }
  317.     /**
  318.      * @param string|null $ownerName
  319.      *
  320.      * @return $this
  321.      */
  322.     public function setOwnerName(?string $ownerName): self
  323.     {
  324.         $this->ownerName $ownerName;
  325.         return $this;
  326.     }
  327.     /**
  328.      * Get ownerName
  329.      *
  330.      * @return string|null
  331.      */
  332.     public function getOwnerName(): ?string
  333.     {
  334.         return $this->ownerName;
  335.     }
  336.     /**
  337.      * @param string|null $ownerLastname
  338.      *
  339.      * @return $this
  340.      */
  341.     public function setOwnerLastname(?string $ownerLastname): self
  342.     {
  343.         $this->ownerLastname $ownerLastname;
  344.         return $this;
  345.     }
  346.     /**
  347.      * Get ownerLastname
  348.      *
  349.      * @return string|null
  350.      */
  351.     public function getOwnerLastname(): ?string
  352.     {
  353.         return $this->ownerLastname;
  354.     }
  355.     /**
  356.      * @param string|null $ownerAddress
  357.      *
  358.      * @return $this
  359.      */
  360.     public function setOwnerAddress(?string $ownerAddress): self
  361.     {
  362.         $this->ownerAddress $ownerAddress;
  363.         return $this;
  364.     }
  365.     /**
  366.      * @return string|null
  367.      */
  368.     public function getCompanyName(): ?string
  369.     {
  370.         return $this->companyName;
  371.     }
  372.     /**
  373.      * @param string|null $companyName
  374.      */
  375.     public function setCompanyName(?string $companyName): void
  376.     {
  377.         $this->companyName $companyName;
  378.     }
  379.     /**
  380.      * @return string|null
  381.      */
  382.     public function getMatId(): ?string
  383.     {
  384.         return $this->matId;
  385.     }
  386.     /**
  387.      * @param string|null $matId
  388.      */
  389.     public function setMatId(?string $matId): void
  390.     {
  391.         $this->matId $matId;
  392.     }
  393.     /**
  394.      * @return string|null
  395.      */
  396.     public function getPib(): ?string
  397.     {
  398.         return $this->pib;
  399.     }
  400.     /**
  401.      * @param string|null $pib
  402.      */
  403.     public function setPib(?string $pib): void
  404.     {
  405.         $this->pib $pib;
  406.     }
  407.     /**
  408.      * Get ownerContact
  409.      *
  410.      * @return string|null
  411.      */
  412.     public function getOwnerContact(): ?string
  413.     {
  414.         return $this->ownerContact;
  415.     }
  416.     /**
  417.      * @param string|null $ownerContact
  418.      *
  419.      * @return $this
  420.      */
  421.     public function setOwnerContact(?string $ownerContact): self
  422.     {
  423.         $this->ownerContact $ownerContact;
  424.         return $this;
  425.     }
  426.     /**
  427.      * Get ownerAddress
  428.      *
  429.      * @return string|null
  430.      */
  431.     public function getOwnerAddress(): ?string
  432.     {
  433.         return $this->ownerAddress;
  434.     }
  435.     /**
  436.      * @param bool|null $rent
  437.      *
  438.      * @return $this
  439.      */
  440.     public function setRent(?bool $rent): self
  441.     {
  442.         $this->rent $rent;
  443.         return $this;
  444.     }
  445.     /**
  446.      * @return bool|null
  447.      */
  448.     public function getRent(): ?bool
  449.     {
  450.         return $this->rent;
  451.     }
  452.     /**
  453.      * @param float $debit
  454.      *
  455.      * @return $this
  456.      */
  457.     public function setDebit(float $debit): self
  458.     {
  459.         $this->debit $debit;
  460.         return $this;
  461.     }
  462.     /**
  463.      * @return float
  464.      */
  465.     public function getDebit(): float
  466.     {
  467.         return $this->debit;
  468.     }
  469.     /**
  470.      * @param float|null $oldDebit
  471.      *
  472.      * @return $this
  473.      */
  474.     public function setOldDebit(?float $oldDebit): self
  475.     {
  476.         $this->oldDebit $oldDebit;
  477.         return $this;
  478.     }
  479.     /**
  480.      * @return float|null
  481.      */
  482.     public function getOldDebit(): ?float
  483.     {
  484.         return $this->oldDebit;
  485.     }
  486.     /**
  487.      * @param float|null $previousBill
  488.      *
  489.      * @return $this
  490.      */
  491.     public function setPreviousBill(?float $previousBill): self
  492.     {
  493.         $this->previousBill $previousBill;
  494.         return $this;
  495.     }
  496.     /**
  497.      * @return float|null
  498.      */
  499.     public function getPreviousBill(): ?float
  500.     {
  501.         return $this->previousBill;
  502.     }
  503.     /**
  504.      * Set size
  505.      *
  506.      * @param float|null $size
  507.      *
  508.      * @return Flat
  509.      */
  510.     public function setSize(?float $size): Flat
  511.     {
  512.         $this->size $size;
  513.         return $this;
  514.     }
  515.     /**
  516.      * Get size
  517.      *
  518.      * @return float|null
  519.      */
  520.     public function getSize(): ?float
  521.     {
  522.         return $this->size;
  523.     }
  524.     /**
  525.      * Set comment
  526.      *
  527.      * @param string|null $comment
  528.      *
  529.      * @return Flat
  530.      */
  531.     public function setComment(?string $comment): Flat
  532.     {
  533.         $this->comment $comment;
  534.         return $this;
  535.     }
  536.     /**
  537.      * Get comment
  538.      *
  539.      * @return string|null
  540.      */
  541.     public function getComment(): ?string
  542.     {
  543.         return $this->comment;
  544.     }
  545.     /**
  546.      * @param int $members
  547.      *
  548.      * @return $this
  549.      */
  550.     public function setMembers(int $members): self
  551.     {
  552.         $this->members $members;
  553.         return $this;
  554.     }
  555.     /**
  556.      * Get type
  557.      *
  558.      * @return int|null
  559.      */
  560.     public function getType(): ?int
  561.     {
  562.         return $this->type;
  563.     }
  564.     /**
  565.      * @param int|null $type
  566.      *
  567.      * @return $this
  568.      */
  569.     public function setType(?int $type): self
  570.     {
  571.         $this->type $type;
  572.         return $this;
  573.     }
  574.     /**
  575.      * Get members
  576.      *
  577.      * @return int
  578.      */
  579.     public function getMembers(): int
  580.     {
  581.         return $this->members;
  582.     }
  583.     /**
  584.      * @param string $displayFlatId
  585.      *
  586.      * @return $this
  587.      */
  588.     public function setDisplayFlatId(string $displayFlatId): self
  589.     {
  590.         $this->displayFlatId $displayFlatId;
  591.         return $this;
  592.     }
  593.     /**
  594.      * Get displayFlatId
  595.      *
  596.      * @return string
  597.      */
  598.     public function getDisplayFlatId(): string
  599.     {
  600.         return $this->displayFlatId;
  601.     }
  602.     /**
  603.      * @return DateTime|null
  604.      */
  605.     public function getCreatedAt(): ?DateTime
  606.     {
  607.         return $this->createdAt;
  608.     }
  609.     /**
  610.      * @return DateTime|null
  611.      */
  612.     public function getUpdatedAt(): ?DateTime
  613.     {
  614.         return $this->updatedAt;
  615.     }
  616.     /**
  617.      * @ORM\PrePersist
  618.      */
  619.     public function incrementCreatedAt(): void
  620.     {
  621.         if (null === $this->createdAt) {
  622.             $this->createdAt = new DateTime();
  623.         }
  624.         $this->updatedAt = new DateTime();
  625.     }
  626.     /**
  627.      * @ORM\PreUpdate
  628.      */
  629.     public function incrementUpdatedAt(): void
  630.     {
  631.         $this->updatedAt = new DateTime();
  632.     }
  633.     /**
  634.      * Set createdAt
  635.      *
  636.      * @param DateTime $createdAt
  637.      */
  638.     public function setCreatedAt(DateTime $createdAt): void
  639.     {
  640.         $this->createdAt $createdAt;
  641.     }
  642.     /**
  643.      * Set updatedAt
  644.      *
  645.      * @param DateTime $updatedAt
  646.      */
  647.     public function setUpdatedAt(DateTime $updatedAt): void
  648.     {
  649.         $this->updatedAt $updatedAt;
  650.     }
  651.     /**
  652.      * @return User
  653.      */
  654.     #[Ignore]
  655.     public function getUser(): User
  656.     {
  657.         return $this->user;
  658.     }
  659.     /**
  660.      * @param User $user
  661.      */
  662.     #[Ignore]
  663.     public function setUser(User $user): void
  664.     {
  665.         $this->user $user;
  666.         if (empty($this->createdBy)) {
  667.             $this->createdBy $user->getCreatedByValue();
  668.         }
  669.     }
  670.     /**
  671.      * @return Building
  672.      */
  673.     #[Ignore]
  674.     public function getBuilding(): Building
  675.     {
  676.         return $this->building;
  677.     }
  678.     /**
  679.      * @param Building $building
  680.      */
  681.     #[Ignore]
  682.     public function setBuilding(Building $building): void
  683.     {
  684.         $this->building $building;
  685.     }
  686.     /**
  687.      * @return bool
  688.      */
  689.     public function getEmailCanBeUsed(): bool
  690.     {
  691.         return $this->emailCanBeUsed;
  692.     }
  693.     /**
  694.      * @param bool $emailCanBeUsed
  695.      */
  696.     public function setEmailCanBeUsed(bool $emailCanBeUsed): void
  697.     {
  698.         $this->emailCanBeUsed $emailCanBeUsed;
  699.     }
  700.     /**
  701.      * @return string|null
  702.      */
  703.     public function getCompanyPlace(): ?string
  704.     {
  705.         return $this->companyPlace;
  706.     }
  707.     /**
  708.      * @param string|null $companyPlace
  709.      */
  710.     public function setCompanyPlace(?string $companyPlace): void
  711.     {
  712.         $this->companyPlace $companyPlace;
  713.     }
  714.     /**
  715.      * @return string|null
  716.      */
  717.     public function getOccupant(): ?string
  718.     {
  719.         return $this->occupant;
  720.     }
  721.     /**
  722.      * @param string|null $occupant
  723.      */
  724.     public function setOccupant(?string $occupant): void
  725.     {
  726.         $this->occupant $occupant;
  727.     }
  728.     /**
  729.      * @return string|null
  730.      */
  731.     public function getOccupantEmail(): ?string
  732.     {
  733.         return $this->occupantEmail;
  734.     }
  735.     /**
  736.      * @param string|null $occupantEmail
  737.      */
  738.     public function setOccupantEmail(?string $occupantEmail): void
  739.     {
  740.         $this->occupantEmail $occupantEmail;
  741.     }
  742.     /**
  743.      * @return int|null
  744.      */
  745.     public function getArchived(): ?int
  746.     {
  747.         return $this->archived;
  748.     }
  749.     /**
  750.      * @param int|null $archived
  751.      */
  752.     public function setArchived(?int $archived): void
  753.     {
  754.         $this->archived $archived;
  755.     }
  756.     /**
  757.      * @return Flat|null
  758.      */
  759.     #[Ignore]
  760.     public function getCurrentFlat(): ?Flat
  761.     {
  762.         return $this->currentFlat;
  763.     }
  764.     /**
  765.      * @param Flat|null $currentFlat
  766.      */
  767.     #[Ignore]
  768.     public function setCurrentFlat(?Flat $currentFlat): void
  769.     {
  770.         $this->currentFlat $currentFlat;
  771.     }
  772.     /**
  773.      * @return string|null
  774.      */
  775.     public function getBankAccount(): ?string
  776.     {
  777.         return $this->bankAccount;
  778.     }
  779.     /**
  780.      * @param string|null $bankAccount
  781.      */
  782.     public function setBankAccount(?string $bankAccount): void
  783.     {
  784.         $this->bankAccount $bankAccount;
  785.     }
  786.     /**
  787.      * @return int|null
  788.      */
  789.     public function getSubType(): ?int
  790.     {
  791.         return $this->subType;
  792.     }
  793.     /**
  794.      * @param int|null $subType
  795.      */
  796.     public function setSubType(?int $subType): void
  797.     {
  798.         $this->subType $subType;
  799.     }
  800.     /**
  801.      * Get owner name+lastName
  802.      *
  803.      * @return string
  804.      */
  805.     public function getFullName(): string
  806.     {
  807.         return sprintf("%s %s"$this->getOwnerName(), $this->getOwnerLastname());
  808.     }
  809.     /**
  810.      * @return Collection<int, FlatWarning>
  811.      */
  812.     #[Ignore]
  813.     public function getFlatWarnings(): Collection
  814.     {
  815.         return $this->flatWarnings;
  816.     }
  817.     /**
  818.      * @param Collection<int, FlatWarning> $flatWarnings
  819.      */
  820.     #[Ignore]
  821.     public function setFlatWarnings(Collection $flatWarnings): void
  822.     {
  823.         $this->flatWarnings $flatWarnings;
  824.     }
  825.     /**
  826.      * @return User
  827.      */
  828.     #[Ignore]
  829.     public function getFlatUser(): User
  830.     {
  831.         return $this->user;
  832.     }
  833.     /**
  834.      * @param User $user
  835.      */
  836.     #[Ignore]
  837.     public function setFlatUser(User $user): void
  838.     {
  839.         $this->user $user;
  840.     }
  841.     /**
  842.      * @return DateTime
  843.      */
  844.     public function getArchivedAt(): DateTime
  845.     {
  846.         return $this->archivedAt;
  847.     }
  848.     /**
  849.      * @param DateTime $archivedAt
  850.      */
  851.     public function setArchivedAt(DateTime $archivedAt): void
  852.     {
  853.         $this->archivedAt $archivedAt;
  854.     }
  855.     public function __toString()
  856.     {
  857.         return (string) $this->getDisplayFlatId();
  858.     }
  859.     /**
  860.      * @return Collection<int, PollOption>
  861.      */
  862.     #[Ignore]
  863.     public function getvotedOptions(): Collection
  864.     {
  865.         return $this->votedOptions;
  866.     }
  867.     /**
  868.      * @param Collection<int, PollOption> $votedOptions
  869.      */
  870.     #[Ignore]
  871.     public function setvotedOptions(Collection $votedOptions): void
  872.     {
  873.         $this->votedOptions $votedOptions;
  874.     }
  875.     /**
  876.      * @return bool
  877.      */
  878.     public function getEInvoice(): bool
  879.     {
  880.         return $this->eInvoice;
  881.     }
  882.     /**
  883.      * @param bool $eInvoice
  884.      */
  885.     public function setEInvoice(bool $eInvoice): void
  886.     {
  887.         $this->eInvoice $eInvoice;
  888.     }
  889.     /**
  890.      * @return string|null
  891.      */
  892.     public function getJbkjs(): ?string
  893.     {
  894.         return $this->jbkjs;
  895.     }
  896.     /**
  897.      * @param string|null $jbkjs
  898.      */
  899.     public function setJbkjs(?string $jbkjs): void
  900.     {
  901.         $this->jbkjs $jbkjs;
  902.     }
  903.     /**
  904.      * @return Resident|null
  905.      */
  906.     #[Ignore]
  907.     public function getResident(): ?Resident
  908.     {
  909.         return $this->resident;
  910.     }
  911.     /**
  912.      * @param Resident|null $resident
  913.      */
  914.     #[Ignore]
  915.     public function setResident(?Resident $resident): void
  916.     {
  917.         $this->resident $resident;
  918.     }
  919.     /**
  920.      * @return string|null
  921.      */
  922.     public function getContractNumber(): ?string
  923.     {
  924.         return $this->contractNumber;
  925.     }
  926.     /**
  927.      * @param string|null $contractNumber
  928.      */
  929.     public function setContractNumber(?string $contractNumber): void
  930.     {
  931.         $this->contractNumber $contractNumber;
  932.     }
  933.     public function getOrderNumber(): ?string
  934.     {
  935.         return $this->orderNumber;
  936.     }
  937.     public function setOrderNumber(?string $orderNumber): void
  938.     {
  939.         $this->orderNumber $orderNumber;
  940.     }
  941.     public function getObjectCode(): ?string
  942.     {
  943.         return $this->objectCode;
  944.     }
  945.     public function setObjectCode(?string $objectCode): void
  946.     {
  947.         $this->objectCode $objectCode;
  948.     }
  949.     public function isPrintBill(): bool
  950.     {
  951.         return $this->printBill;
  952.     }
  953.     public function setPrintBill(bool $printBill): void
  954.     {
  955.         $this->printBill $printBill;
  956.     }
  957.     public function getOwnerPhoneNumber(): ?string
  958.     {
  959.         return $this->ownerPhoneNumber;
  960.     }
  961.     public function setOwnerPhoneNumber(?string $ownerPhoneNumber): void
  962.     {
  963.         $this->ownerPhoneNumber $ownerPhoneNumber;
  964.     }
  965.     public function getOldDebitDate(): ?DateTime
  966.     {
  967.         return $this->oldDebitDate;
  968.     }
  969.     public function setOldDebitDate(?DateTime $oldDebitDate): void
  970.     {
  971.         $this->oldDebitDate $oldDebitDate;
  972.     }
  973. }