src/Entity/FinancialPart.php line 16

  1. <?php
  2. namespace App\Entity;
  3. use App\Enum\IncomeEnum;
  4. use App\Repository\FinancialPartRepository;
  5. use App\Repository\SantaRepository;
  6. use Doctrine\Common\Collections\ArrayCollection;
  7. use Doctrine\Common\Collections\Collection;
  8. use Doctrine\DBAL\Types\Types;
  9. use Doctrine\ORM\Mapping as ORM;
  10. #[ORM\Entity(repositoryClassFinancialPartRepository::class)]
  11. class FinancialPart
  12. {
  13.     #[ORM\Id]
  14.     #[ORM\GeneratedValue]
  15.     #[ORM\Column]
  16.     private ?int $id null;
  17.     #[ORM\Column(type'integer'nullabletrueoptions: ['default' => IncomeEnum::TYPE_DAILY])]
  18.     private ?int $incomeType null;
  19.     #[ORM\Column(type'text'nullabletrue)]
  20.     private mixed $comment;
  21.     #[ORM\ManyToOne(targetEntityPage::class, inversedBy'financialPart')]
  22.     #[ORM\JoinColumn(nullabletrueonDelete'CASCADE')]
  23.     private ?Page $page null;
  24.     #[ORM\OneToMany(mappedBy'financialPart'targetEntityUserSalary::class, cascade: ["persist""remove"])]
  25.     protected ?Collection $userSalary null;
  26.     #[ORM\Column(type'float'nullabletrue)]
  27.     private ?float $totalPrice;
  28.     #[ORM\Column(type'string'nullabletrue)]
  29.     private ?string $coinType1 null;
  30.     #[ORM\Column(type'float'nullabletrue)]
  31.     private ?float $coinQuantity1 null;
  32.     #[ORM\Column(type'float'nullabletrue)]
  33.     private ?float $transferQuantity1 null;
  34.     #[ORM\Column(type'string'nullabletrue)]
  35.     private ?string $coinType2 null;
  36.     #[ORM\Column(type'float'nullabletrue)]
  37.     private ?float $coinQuantity2 null;
  38.     #[ORM\Column(type'float'nullabletrue)]
  39.     private ?float $transferQuantity2 null;
  40.     #[ORM\Column(type'string'nullabletrue)]
  41.     private ?string $coinType3 null;
  42.     #[ORM\Column(type'float'nullabletrue)]
  43.     private ?float $coinQuantity3 null;
  44.     #[ORM\Column(type'float'nullabletrue)]
  45.     private ?float $transferQuantity3 null;
  46.     #[ORM\Column(type'string'nullabletrue)]
  47.     private ?string $coinType4 null;
  48.     #[ORM\Column(type'float'nullabletrue)]
  49.     private ?float $coinQuantity4 null;
  50.     #[ORM\Column(type'float'nullabletrue)]
  51.     private ?float $transferQuantity4 null;
  52.     #[ORM\Column(type'string'nullabletrue)]
  53.     private ?string $coinType5 null;
  54.     #[ORM\Column(type'float'nullabletrue)]
  55.     private ?float $coinQuantity5 null;
  56.     #[ORM\Column(type'float'nullabletrue)]
  57.     private ?float $transferQuantity5 null;
  58.     #[ORM\Column(type'string'nullabletrue)]
  59.     private ?string $coinType6 null;
  60.     #[ORM\Column(type'float'nullabletrue)]
  61.     private ?float $coinQuantity6 null;
  62.     #[ORM\Column(type'float'nullabletrue)]
  63.     private ?float $transferQuantity6 null;
  64.     #[ORM\Column(type'string'nullabletrue)]
  65.     private ?string $coinType7 null;
  66.     #[ORM\Column(type'float'nullabletrue)]
  67.     private ?float $coinQuantity7 null;
  68.     #[ORM\Column(type'float'nullabletrue)]
  69.     private ?float $transferQuantity7 null;
  70.     #[ORM\Column(type'string'nullabletrue)]
  71.     private ?string $coinType8 null;
  72.     #[ORM\Column(type'float'nullabletrue)]
  73.     private ?float $coinQuantity8 null;
  74.     #[ORM\Column(type'float'nullabletrue)]
  75.     private ?float $transferQuantity8 null;
  76.     #[ORM\Column(type'string'nullabletrue)]
  77.     private ?string $coinType9 null;
  78.     #[ORM\Column(type'float'nullabletrue)]
  79.     private ?float $coinQuantity9 null;
  80.     #[ORM\Column(type'float'nullabletrue)]
  81.     private ?float $transferQuantity9 null;
  82.     #[ORM\Column(type'string'nullabletrue)]
  83.     private ?string $coinType10 null;
  84.     #[ORM\Column(type'float'nullabletrue)]
  85.     private ?float $coinQuantity10 null;
  86.     #[ORM\Column(type'float'nullabletrue)]
  87.     private ?float $transferQuantity10 null;
  88.     #[ORM\Column(type'string'nullabletrue)]
  89.     private ?string $coinType11 null;
  90.     #[ORM\Column(type'float'nullabletrue)]
  91.     private ?float $coinQuantity11 null;
  92.     #[ORM\Column(type'float'nullabletrue)]
  93.     private ?float $transferQuantity11 null;
  94.     #[ORM\Column(type'string'nullabletrue)]
  95.     private ?string $coinType12 null;
  96.     #[ORM\Column(type'float'nullabletrue)]
  97.     private ?float $coinQuantity12 null;
  98.     #[ORM\Column(type'float'nullabletrue)]
  99.     private ?float $transferQuantity12 null;
  100.     #[ORM\Column(type'string'nullabletrue)]
  101.     private ?string $coinType13 null;
  102.     #[ORM\Column(type'float'nullabletrue)]
  103.     private ?float $coinQuantity13 null;
  104.     #[ORM\Column(type'float'nullabletrue)]
  105.     private ?float $transferQuantity13 null;
  106.     #[ORM\Column(type'string'nullabletrue)]
  107.     private ?string $coinType14 null;
  108.     #[ORM\Column(type'float'nullabletrue)]
  109.     private ?float $coinQuantity14 null;
  110.     #[ORM\Column(type'float'nullabletrue)]
  111.     private ?float $transferQuantity14 null;
  112.     #[ORM\Column(type'string'nullabletrue)]
  113.     private ?string $coinType15 null;
  114.     #[ORM\Column(type'float'nullabletrue)]
  115.     private ?float $coinQuantity15 null;
  116.     #[ORM\Column(type'float'nullabletrue)]
  117.     private ?float $transferQuantity15 null;
  118.     #[ORM\Column(type'datetime'nullabletrue)]
  119.     private \DateTimeInterface|null $createdAt null;
  120.     #[ORM\Column(type'date'nullabletrue)]
  121.     private ?\DateTimeInterface $currentDay null;
  122.     #[ORM\Column(type'integer'nullabletrue)]
  123.     private ?int $type null;
  124.     public function __construct()
  125.     {
  126.         $this->userSalary = new ArrayCollection();
  127.     }
  128.     public function getId(): ?int
  129.     {
  130.         return $this->id;
  131.     }
  132.     public function getTotalPrice(): ?float
  133.     {
  134.         return $this->totalPrice;
  135.     }
  136.     public function setTotalPrice(?float $totalPrice): static
  137.     {
  138.         $this->totalPrice $totalPrice;
  139.         return $this;
  140.     }
  141.     public function getCoinType1(): ?string
  142.     {
  143.         return $this->coinType1;
  144.     }
  145.     public function setCoinType1(?string $coinType1): static
  146.     {
  147.         $this->coinType1 $coinType1;
  148.         return $this;
  149.     }
  150.     public function getCoinQuantity1(): ?float
  151.     {
  152.         return $this->coinQuantity1;
  153.     }
  154.     public function setCoinQuantity1(?float $coinQuantity1): static
  155.     {
  156.         $this->coinQuantity1 $coinQuantity1;
  157.         return $this;
  158.     }
  159.     public function getTransferQuantity1(): ?float
  160.     {
  161.         return $this->transferQuantity1;
  162.     }
  163.     public function setTransferQuantity1(?float $transferQuantity1): static
  164.     {
  165.         $this->transferQuantity1 $transferQuantity1;
  166.         return $this;
  167.     }
  168.     public function getCoinType2(): ?string
  169.     {
  170.         return $this->coinType2;
  171.     }
  172.     public function setCoinType2(?string $coinType2): static
  173.     {
  174.         $this->coinType2 $coinType2;
  175.         return $this;
  176.     }
  177.     public function getCoinQuantity2(): ?float
  178.     {
  179.         return $this->coinQuantity2;
  180.     }
  181.     public function setCoinQuantity2(?float $coinQuantity2): static
  182.     {
  183.         $this->coinQuantity2 $coinQuantity2;
  184.         return $this;
  185.     }
  186.     public function getTransferQuantity2(): ?float
  187.     {
  188.         return $this->transferQuantity2;
  189.     }
  190.     public function setTransferQuantity2(?float $transferQuantity2): static
  191.     {
  192.         $this->transferQuantity2 $transferQuantity2;
  193.         return $this;
  194.     }
  195.     public function getCoinType3(): ?string
  196.     {
  197.         return $this->coinType3;
  198.     }
  199.     public function setCoinType3(?string $coinType3): static
  200.     {
  201.         $this->coinType3 $coinType3;
  202.         return $this;
  203.     }
  204.     public function getCoinQuantity3(): ?float
  205.     {
  206.         return $this->coinQuantity3;
  207.     }
  208.     public function setCoinQuantity3(?float $coinQuantity3): static
  209.     {
  210.         $this->coinQuantity3 $coinQuantity3;
  211.         return $this;
  212.     }
  213.     public function getTransferQuantity3(): ?float
  214.     {
  215.         return $this->transferQuantity3;
  216.     }
  217.     public function setTransferQuantity3(?float $transferQuantity3): static
  218.     {
  219.         $this->transferQuantity3 $transferQuantity3;
  220.         return $this;
  221.     }
  222.     public function getCoinType4(): ?string
  223.     {
  224.         return $this->coinType4;
  225.     }
  226.     public function setCoinType4(?string $coinType4): static
  227.     {
  228.         $this->coinType4 $coinType4;
  229.         return $this;
  230.     }
  231.     public function getCoinQuantity4(): ?float
  232.     {
  233.         return $this->coinQuantity4;
  234.     }
  235.     public function setCoinQuantity4(?float $coinQuantity4): static
  236.     {
  237.         $this->coinQuantity4 $coinQuantity4;
  238.         return $this;
  239.     }
  240.     public function getTransferQuantity4(): ?float
  241.     {
  242.         return $this->transferQuantity4;
  243.     }
  244.     public function setTransferQuantity4(?float $transferQuantity4): static
  245.     {
  246.         $this->transferQuantity4 $transferQuantity4;
  247.         return $this;
  248.     }
  249.     public function getCoinType5(): ?string
  250.     {
  251.         return $this->coinType5;
  252.     }
  253.     public function setCoinType5(?string $coinType5): static
  254.     {
  255.         $this->coinType5 $coinType5;
  256.         return $this;
  257.     }
  258.     public function getCoinQuantity5(): ?float
  259.     {
  260.         return $this->coinQuantity5;
  261.     }
  262.     public function setCoinQuantity5(?float $coinQuantity5): static
  263.     {
  264.         $this->coinQuantity5 $coinQuantity5;
  265.         return $this;
  266.     }
  267.     public function getTransferQuantity5(): ?float
  268.     {
  269.         return $this->transferQuantity5;
  270.     }
  271.     public function setTransferQuantity5(?float $transferQuantity5): static
  272.     {
  273.         $this->transferQuantity5 $transferQuantity5;
  274.         return $this;
  275.     }
  276.     public function getCoinType6(): ?string
  277.     {
  278.         return $this->coinType6;
  279.     }
  280.     public function setCoinType6(?string $coinType6): static
  281.     {
  282.         $this->coinType6 $coinType6;
  283.         return $this;
  284.     }
  285.     public function getCoinQuantity6(): ?float
  286.     {
  287.         return $this->coinQuantity6;
  288.     }
  289.     public function setCoinQuantity6(?float $coinQuantity6): static
  290.     {
  291.         $this->coinQuantity6 $coinQuantity6;
  292.         return $this;
  293.     }
  294.     public function getTransferQuantity6(): ?float
  295.     {
  296.         return $this->transferQuantity6;
  297.     }
  298.     public function setTransferQuantity6(?float $transferQuantity6): static
  299.     {
  300.         $this->transferQuantity6 $transferQuantity6;
  301.         return $this;
  302.     }
  303.     public function getCoinType7(): ?string
  304.     {
  305.         return $this->coinType7;
  306.     }
  307.     public function setCoinType7(?string $coinType7): static
  308.     {
  309.         $this->coinType7 $coinType7;
  310.         return $this;
  311.     }
  312.     public function getCoinQuantity7(): ?float
  313.     {
  314.         return $this->coinQuantity7;
  315.     }
  316.     public function setCoinQuantity7(?float $coinQuantity7): static
  317.     {
  318.         $this->coinQuantity7 $coinQuantity7;
  319.         return $this;
  320.     }
  321.     public function getTransferQuantity7(): ?float
  322.     {
  323.         return $this->transferQuantity7;
  324.     }
  325.     public function setTransferQuantity7(?float $transferQuantity7): static
  326.     {
  327.         $this->transferQuantity7 $transferQuantity7;
  328.         return $this;
  329.     }
  330.     public function getCoinType8(): ?string
  331.     {
  332.         return $this->coinType8;
  333.     }
  334.     public function setCoinType8(?string $coinType8): static
  335.     {
  336.         $this->coinType8 $coinType8;
  337.         return $this;
  338.     }
  339.     public function getCoinQuantity8(): ?float
  340.     {
  341.         return $this->coinQuantity8;
  342.     }
  343.     public function setCoinQuantity8(?float $coinQuantity8): static
  344.     {
  345.         $this->coinQuantity8 $coinQuantity8;
  346.         return $this;
  347.     }
  348.     public function getTransferQuantity8(): ?float
  349.     {
  350.         return $this->transferQuantity8;
  351.     }
  352.     public function setTransferQuantity8(?float $transferQuantity8): static
  353.     {
  354.         $this->transferQuantity8 $transferQuantity8;
  355.         return $this;
  356.     }
  357.     public function getCoinType9(): ?string
  358.     {
  359.         return $this->coinType9;
  360.     }
  361.     public function setCoinType9(?string $coinType9): static
  362.     {
  363.         $this->coinType9 $coinType9;
  364.         return $this;
  365.     }
  366.     public function getCoinQuantity9(): ?float
  367.     {
  368.         return $this->coinQuantity9;
  369.     }
  370.     public function setCoinQuantity9(?float $coinQuantity9): static
  371.     {
  372.         $this->coinQuantity9 $coinQuantity9;
  373.         return $this;
  374.     }
  375.     public function getTransferQuantity9(): ?float
  376.     {
  377.         return $this->transferQuantity9;
  378.     }
  379.     public function setTransferQuantity9(?float $transferQuantity9): static
  380.     {
  381.         $this->transferQuantity9 $transferQuantity9;
  382.         return $this;
  383.     }
  384.     public function getCoinType10(): ?string
  385.     {
  386.         return $this->coinType10;
  387.     }
  388.     public function setCoinType10(?string $coinType10): static
  389.     {
  390.         $this->coinType10 $coinType10;
  391.         return $this;
  392.     }
  393.     public function getCoinQuantity10(): ?float
  394.     {
  395.         return $this->coinQuantity10;
  396.     }
  397.     public function setCoinQuantity10(?float $coinQuantity10): static
  398.     {
  399.         $this->coinQuantity10 $coinQuantity10;
  400.         return $this;
  401.     }
  402.     public function getTransferQuantity10(): ?float
  403.     {
  404.         return $this->transferQuantity10;
  405.     }
  406.     public function setTransferQuantity10(?float $transferQuantity10): static
  407.     {
  408.         $this->transferQuantity10 $transferQuantity10;
  409.         return $this;
  410.     }
  411.     public function getCoinType11(): ?string
  412.     {
  413.         return $this->coinType11;
  414.     }
  415.     public function setCoinType11(?string $coinType11): static
  416.     {
  417.         $this->coinType11 $coinType11;
  418.         return $this;
  419.     }
  420.     public function getCoinQuantity11(): ?float
  421.     {
  422.         return $this->coinQuantity11;
  423.     }
  424.     public function setCoinQuantity11(?float $coinQuantity11): static
  425.     {
  426.         $this->coinQuantity11 $coinQuantity11;
  427.         return $this;
  428.     }
  429.     public function getTransferQuantity11(): ?float
  430.     {
  431.         return $this->transferQuantity11;
  432.     }
  433.     public function setTransferQuantity11(?float $transferQuantity11): static
  434.     {
  435.         $this->transferQuantity11 $transferQuantity11;
  436.         return $this;
  437.     }
  438.     public function getCoinType12(): ?string
  439.     {
  440.         return $this->coinType12;
  441.     }
  442.     public function setCoinType12(?string $coinType12): static
  443.     {
  444.         $this->coinType12 $coinType12;
  445.         return $this;
  446.     }
  447.     public function getCoinQuantity12(): ?float
  448.     {
  449.         return $this->coinQuantity12;
  450.     }
  451.     public function setCoinQuantity12(?float $coinQuantity12): static
  452.     {
  453.         $this->coinQuantity12 $coinQuantity12;
  454.         return $this;
  455.     }
  456.     public function getTransferQuantity12(): ?float
  457.     {
  458.         return $this->transferQuantity12;
  459.     }
  460.     public function setTransferQuantity12(?float $transferQuantity12): static
  461.     {
  462.         $this->transferQuantity12 $transferQuantity12;
  463.         return $this;
  464.     }
  465.     public function getCoinType13(): ?string
  466.     {
  467.         return $this->coinType13;
  468.     }
  469.     public function setCoinType13(?string $coinType13): static
  470.     {
  471.         $this->coinType13 $coinType13;
  472.         return $this;
  473.     }
  474.     public function getCoinQuantity13(): ?float
  475.     {
  476.         return $this->coinQuantity13;
  477.     }
  478.     public function setCoinQuantity13(?float $coinQuantity13): static
  479.     {
  480.         $this->coinQuantity13 $coinQuantity13;
  481.         return $this;
  482.     }
  483.     public function getTransferQuantity13(): ?float
  484.     {
  485.         return $this->transferQuantity13;
  486.     }
  487.     public function setTransferQuantity13(?float $transferQuantity13): static
  488.     {
  489.         $this->transferQuantity13 $transferQuantity13;
  490.         return $this;
  491.     }
  492.     public function getCoinType14(): ?string
  493.     {
  494.         return $this->coinType14;
  495.     }
  496.     public function setCoinType14(?string $coinType14): static
  497.     {
  498.         $this->coinType14 $coinType14;
  499.         return $this;
  500.     }
  501.     public function getCoinQuantity14(): ?float
  502.     {
  503.         return $this->coinQuantity14;
  504.     }
  505.     public function setCoinQuantity14(?float $coinQuantity14): static
  506.     {
  507.         $this->coinQuantity14 $coinQuantity14;
  508.         return $this;
  509.     }
  510.     public function getTransferQuantity14(): ?float
  511.     {
  512.         return $this->transferQuantity14;
  513.     }
  514.     public function setTransferQuantity14(?float $transferQuantity14): static
  515.     {
  516.         $this->transferQuantity14 $transferQuantity14;
  517.         return $this;
  518.     }
  519.     public function getCoinType15(): ?string
  520.     {
  521.         return $this->coinType15;
  522.     }
  523.     public function setCoinType15(?string $coinType15): static
  524.     {
  525.         $this->coinType15 $coinType15;
  526.         return $this;
  527.     }
  528.     public function getCoinQuantity15(): ?float
  529.     {
  530.         return $this->coinQuantity15;
  531.     }
  532.     public function setCoinQuantity15(?float $coinQuantity15): static
  533.     {
  534.         $this->coinQuantity15 $coinQuantity15;
  535.         return $this;
  536.     }
  537.     public function getTransferQuantity15(): ?float
  538.     {
  539.         return $this->transferQuantity15;
  540.     }
  541.     public function setTransferQuantity15(?float $transferQuantity15): static
  542.     {
  543.         $this->transferQuantity15 $transferQuantity15;
  544.         return $this;
  545.     }
  546.     public function getPage(): ?Page
  547.     {
  548.         return $this->page;
  549.     }
  550.     public function setPage(?Page $page): static
  551.     {
  552.         $this->page $page;
  553.         return $this;
  554.     }
  555.     /**
  556.      * @return \DateTimeInterface|null
  557.      */
  558.     public function getCreatedAt(): ?\DateTimeInterface
  559.     {
  560.         return $this->createdAt;
  561.     }
  562.     /**
  563.      * @param \DateTimeInterface|null $createdAt
  564.      */
  565.     public function setCreatedAt(?\DateTimeInterface $createdAt): void
  566.     {
  567.         $this->createdAt $createdAt;
  568.     }
  569.     /**
  570.      * @return \DateTimeInterface|null
  571.      */
  572.     public function getCurrentDay(): ?\DateTimeInterface
  573.     {
  574.         return $this->currentDay;
  575.     }
  576.     /**
  577.      * @param \DateTimeInterface|null $currentDay
  578.      */
  579.     public function setCurrentDay(?\DateTimeInterface $currentDay): void
  580.     {
  581.         $this->currentDay $currentDay;
  582.     }
  583.     /**
  584.      * @return int|null
  585.      */
  586.     public function getType(): ?int
  587.     {
  588.         return $this->type;
  589.     }
  590.     /**
  591.      * @param int|null $type
  592.      */
  593.     public function setType(?int $type): void
  594.     {
  595.         $this->type $type;
  596.     }
  597.     /**
  598.      * @return Collection<int, UserSalary>
  599.      */
  600.     public function getUserSalary(): Collection
  601.     {
  602.         return $this->userSalary;
  603.     }
  604.     public function addUserSalary(UserSalary $userSalary): static
  605.     {
  606.         if (!$this->userSalary->contains($userSalary)) {
  607.             $this->userSalary->add($userSalary);
  608.             $userSalary->setFinancialPart($this);
  609.         }
  610.         return $this;
  611.     }
  612.     public function removeUserSalary(UserSalary $userSalary): static
  613.     {
  614.         if ($this->userSalary->removeElement($userSalary)) {
  615.             // set the owning side to null (unless already changed)
  616.             if ($userSalary->getFinancialPart() === $this) {
  617.                 $userSalary->setFinancialPart(null);
  618.             }
  619.         }
  620.         return $this;
  621.     }
  622.     public function getIncomeType(): ?int
  623.     {
  624.         return $this->incomeType;
  625.     }
  626.     public function setIncomeType(?int $incomeType): static
  627.     {
  628.         $this->incomeType $incomeType;
  629.         return $this;
  630.     }
  631.     public function getComment(): ?string
  632.     {
  633.         return $this->comment;
  634.     }
  635.     public function setComment(?string $comment): static
  636.     {
  637.         $this->comment $comment;
  638.         return $this;
  639.     }
  640. }