src/Entity/Payment.php line 20

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\PaymentRepository;
  4. use DateTimeInterface;
  5. use Doctrine\ORM\Mapping as ORM;
  6. /**
  7.  * @ORM\Entity(repositoryClass=PaymentRepository::class)
  8.  * @ORM\Table(name="payments", indexes={
  9.  *     @ORM\Index(columns={"ip_text"}, name="idx_ip_text"),
  10.  *     @ORM\Index(columns={"receipt_id"}, name="idx_receipt_id"),
  11.  *     @ORM\Index(columns={"opdate"}, name="idx_opdate"),
  12.  *     @ORM\Index(columns={"aggregated"}, name="idx_aggregated"),
  13.  *     @ORM\Index(columns={"aggregated", "opdate"}, name="idx_aggregated_opdate"),
  14.  *     @ORM\Index(columns={"exported_to_clickhouse"}, name="idx_exported_to_clickhouse")
  15.  *     })
  16.  */
  17. class Payment
  18. {
  19.     /**
  20.      * @ORM\Id()
  21.      * @ORM\GeneratedValue()
  22.      * @ORM\Column(type="integer", options={"unsigned": true})
  23.      */
  24.     private ?int $id null;
  25.     /**
  26.      * @ORM\ManyToOne(targetEntity=User::class, inversedBy="payments")
  27.      * @ORM\JoinColumn(nullable=true)
  28.      */
  29.     private $operator;
  30.     /**
  31.      * @ORM\ManyToOne(targetEntity=Club::class, inversedBy="payments")
  32.      * @ORM\JoinColumn(nullable=true)
  33.      */
  34.     private $club;
  35.     /**
  36.      * @ORM\Column(type="datetime", columnDefinition="TIMESTAMP DEFAULT CURRENT_TIMESTAMP")
  37.      */
  38.     private $opdate;
  39.     /**
  40.      * @ORM\Column(type="bigint", options={"default": 0})
  41.      */
  42.     private ?int $amount 0;
  43.     /**
  44.      * @ORM\Column(type="string", length=255, nullable=true, options={"default": ""})
  45.      */
  46.     private string $ip_text "";
  47.     /**
  48.      * @ORM\Column(type="text", nullable=true, options={"default": ""})
  49.      */
  50.     private string $description "";
  51.     /**
  52.      * @ORM\ManyToOne(targetEntity=Opcode::class)
  53.      */
  54.     private $opcode;
  55.     /**
  56.      * @ORM\ManyToOne(targetEntity=Cashdesk::class, inversedBy="payments")
  57.      * @ORM\JoinColumn(nullable=true)
  58.      */
  59.     private $cashdesk;
  60.     /**
  61.      * @ORM\ManyToOne(targetEntity=User::class, inversedBy="payments_user")
  62.      */
  63.     private $user;
  64.     /**
  65.      * @ORM\Column(type="integer", nullable=true, options={"default": 0, "unsigned": true})
  66.      */
  67.     private ?int $user_id 0;
  68.     /**
  69.      * @ORM\Column(type="integer", nullable=true, options={"default": 0, "unsigned": true})
  70.      */
  71.     private ?int $receipt_id 0;
  72.     /**
  73.      * @ORM\Column(type="integer", nullable=true, options={"default": 0, "unsigned": true})
  74.      */
  75.     private ?int $bank_check_id 0;
  76.     /**
  77.      * @ORM\Column(type="integer", nullable=true, options={"default": 0, "unsigned": true})
  78.      */
  79.     private ?int $status_id 0;
  80.     /**
  81.      * @ORM\Column(type="bigint", options={"default": 0})
  82.      */
  83.     private int $balance_before 0;
  84.     /**
  85.      * @ORM\Column(type="bigint", options={"default": 0})
  86.      */
  87.     private int $balance_after 0;
  88.     /**
  89.      * @ORM\Column(type="bigint", options={"default": 0})
  90.      */
  91.     private int $user_balance_before 0;
  92.     /**
  93.      * @ORM\Column(type="bigint", options={"default": 0})
  94.      */
  95.     private int $user_balance_after 0;
  96.     /**
  97.      * @ORM\ManyToOne(targetEntity=Partner::class)
  98.      */
  99.     private $partner;
  100.     /**
  101.      * @ORM\Column(type="boolean", options={"unsigned": true, "default": 0})
  102.      */
  103.     private bool $exported_to_clickhouse false;
  104.     /**
  105.      * @ORM\Column(type="boolean", options={"unsigned": true, "default": 0})
  106.      */
  107.     private bool $aggregated false;
  108.     public function getId(): ?int
  109.     {
  110.         return $this->id;
  111.     }
  112.     public function getOperator(): ?User
  113.     {
  114.         return $this->operator;
  115.     }
  116.     public function setOperator(?User $operator): self
  117.     {
  118.         $this->operator $operator;
  119.         return $this;
  120.     }
  121.     public function getClub(): ?Club
  122.     {
  123.         return $this->club;
  124.     }
  125.     public function setClub(?Club $club): self
  126.     {
  127.         $this->club $club;
  128.         return $this;
  129.     }
  130.     public function getOpdate(): ?DateTimeInterface
  131.     {
  132.         return $this->opdate;
  133.     }
  134.     public function setOpdate(DateTimeInterface $opdate): self
  135.     {
  136.         $this->opdate $opdate;
  137.         return $this;
  138.     }
  139.     public function getAmount(): ?int
  140.     {
  141.         return $this->amount;
  142.     }
  143.     public function setAmount(int $amount): self
  144.     {
  145.         $this->amount $amount;
  146.         return $this;
  147.     }
  148.     public function getIpText(): ?string
  149.     {
  150.         return $this->ip_text;
  151.     }
  152.     public function setIpText(string $ip_text): self
  153.     {
  154.         $this->ip_text $ip_text;
  155.         return $this;
  156.     }
  157.     public function getDescription(): ?string
  158.     {
  159.         return $this->description;
  160.     }
  161.     public function setDescription(string $description): self
  162.     {
  163.         $this->description $description;
  164.         return $this;
  165.     }
  166.     public function getOpcode(): ?Opcode
  167.     {
  168.         return $this->opcode;
  169.     }
  170.     public function setOpcode(?Opcode $opcode): self
  171.     {
  172.         $this->opcode $opcode;
  173.         return $this;
  174.     }
  175.     public function getCashdesk(): ?Cashdesk
  176.     {
  177.         return $this->cashdesk;
  178.     }
  179.     public function setCashdesk(?Cashdesk $cashdesk): self
  180.     {
  181.         $this->cashdesk $cashdesk;
  182.         return $this;
  183.     }
  184.     public function getUser(): ?User
  185.     {
  186.         return $this->user;
  187.     }
  188.     public function setUser(?User $user): self
  189.     {
  190.         $this->user $user;
  191.         return $this;
  192.     }
  193.     public function getUserId(): ?int
  194.     {
  195.         return $this->user_id;
  196.     }
  197.     public function setUserId(?int $user_id): self
  198.     {
  199.         $this->user_id $user_id;
  200.         return $this;
  201.     }
  202.     public function getReceiptId(): ?int
  203.     {
  204.         return $this->receipt_id;
  205.     }
  206.     public function setReceiptId(?int $receipt_id): self
  207.     {
  208.         $this->receipt_id $receipt_id;
  209.         return $this;
  210.     }
  211.     public function getBankCheckId(): ?int
  212.     {
  213.         return $this->bank_check_id;
  214.     }
  215.     public function setBankCheckId(?int $bank_check_id): self
  216.     {
  217.         $this->bank_check_id $bank_check_id;
  218.         return $this;
  219.     }
  220.     public function getStatusId(): ?int
  221.     {
  222.         return $this->status_id;
  223.     }
  224.     public function setStatusId(?int $status_id): self
  225.     {
  226.         $this->status_id $status_id;
  227.         return $this;
  228.     }
  229.     public function getBalanceBefore(): int
  230.     {
  231.         return $this->balance_before;
  232.     }
  233.     public function setBalanceBefore(int $balance_before): self
  234.     {
  235.         $this->balance_before $balance_before;
  236.         return $this;
  237.     }
  238.     public function getBalanceAfter(): int
  239.     {
  240.         return $this->balance_after;
  241.     }
  242.     public function setBalanceAfter(int $balance_after): self
  243.     {
  244.         $this->balance_after $balance_after;
  245.         return $this;
  246.     }
  247.     public function getUserBalanceBefore(): int
  248.     {
  249.         return $this->user_balance_before;
  250.     }
  251.     public function setUserBalanceBefore(int $user_balance_before): self
  252.     {
  253.         $this->user_balance_before $user_balance_before;
  254.         return $this;
  255.     }
  256.     public function getUserBalanceAfter(): int
  257.     {
  258.         return $this->user_balance_after;
  259.     }
  260.     public function setUserBalanceAfter(int $user_balance_after): self
  261.     {
  262.         $this->user_balance_after $user_balance_after;
  263.         return $this;
  264.     }
  265.     public function getPartner(): ?Partner
  266.     {
  267.         return $this->partner;
  268.     }
  269.     public function setPartner(?Partner $partner): self
  270.     {
  271.         $this->partner $partner;
  272.         return $this;
  273.     }
  274.     public function isExportedToClickhouse(): bool
  275.     {
  276.         return $this->exported_to_clickhouse;
  277.     }
  278.     public function setExportedToClickhouse(bool $exported_to_clickhouse): self
  279.     {
  280.         $this->exported_to_clickhouse $exported_to_clickhouse;
  281.         return $this;
  282.     }
  283.     public function isAggregated(): ?bool
  284.     {
  285.         return $this->aggregated;
  286.     }
  287.     public function setAggregated(bool $aggregated): self
  288.     {
  289.         $this->aggregated $aggregated;
  290.         return $this;
  291.     }
  292. }