src/Entity/Payment.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\PaymentRepository;
  4. use Doctrine\DBAL\Types\Types;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use Symfony\Component\Serializer\Annotation\Groups;
  7. #[ORM\Entity(repositoryClassPaymentRepository::class)]
  8. class Payment
  9. {
  10.     public const STATE_PAID "PAID";
  11.     public const STATE_NOT_PAID "NOT_PAID";
  12.     public const TYPE_ADMISSION_REGISTER "admission_register";
  13.     public const TYPE_ADMISSION_CREDIT "admission_credit";
  14.     #[ORM\Id]
  15.     #[ORM\GeneratedValue]
  16.     #[ORM\Column(type'integer')]
  17.     #[Groups(['list''au''p'])]
  18.     private ?int $id;
  19.     #[ORM\ManyToOne(targetEntityAdmissionUser::class)]
  20.     #[Groups(['list''p'])]
  21.     private ?AdmissionUser $admissionUser;
  22.     #[ORM\Column(type'string'length20)]
  23.     #[Groups(['list''au''p'])]
  24.     private ?string $paymentType;
  25.     #[ORM\Column(type'string'length20)]
  26.     #[Groups(['list''au''p'])]
  27.     private ?string $paymentCode;
  28.     #[ORM\ManyToOne(targetEntityUser::class)]
  29.     #[Groups(['list''au''p'])]
  30.     private ?User $userCustomer;
  31.     #[ORM\Column(type'integer')]
  32.     #[Groups(['list''au''p'])]
  33.     private ?int $amount;
  34.     #[ORM\Column(type'integer')]
  35.     #[Groups(['list''au''p'])]
  36.     private ?int $amountPaid;
  37.     #[ORM\Column(type'string'length255)]
  38.     #[Groups(['list''au''p'])]
  39.     private ?string $description;
  40.     #[ORM\Column(type'string'length255nullabletrue)]
  41.     #[Groups(['list''au''p'])]
  42.     private ?string $note;
  43.     #[ORM\Column(type'string'length20)]
  44.     #[Groups(['list''au''p'])]
  45.     private ?string $state;
  46.     #[ORM\ManyToOne(targetEntityUser::class)]
  47.     #[Groups(['list''au''p'])]
  48.     private ?User $userCreated;
  49.     #[ORM\Column(type'datetime'nullabletrue)]
  50.     #[Groups(['list''au''p'])]
  51.     private ?\DateTimeInterface $timeCreated;
  52.     #[ORM\Column(type'datetime'nullabletrue)]
  53.     #[Groups(['list''au''p'])]
  54.     private ?\DateTimeInterface $timePaid;
  55.     #[ORM\ManyToOne(targetEntityPaymentLog::class)]
  56.     private ?PaymentLog $lastLog;
  57.     public function __construct()
  58.     {
  59.         $this->amount null;
  60.     }
  61.     public function getId(): ?int
  62.     {
  63.         return $this->id;
  64.     }
  65.     public function getPaymentType(): ?string
  66.     {
  67.         return $this->paymentType;
  68.     }
  69.     public function setPaymentType(string $paymentType): self
  70.     {
  71.         $this->paymentType $paymentType;
  72.         return $this;
  73.     }
  74.     public function getAmount(): ?int
  75.     {
  76.         return $this->amount;
  77.     }
  78.     public function setAmount(int $amount): self
  79.     {
  80.         $this->amount $amount;
  81.         return $this;
  82.     }
  83.     public function getAmountPaid(): ?int
  84.     {
  85.         return $this->amountPaid;
  86.     }
  87.     public function setAmountPaid(int $amountPaid): self
  88.     {
  89.         $this->amountPaid $amountPaid;
  90.         return $this;
  91.     }
  92.     public function getDescription(): ?string
  93.     {
  94.         return $this->description;
  95.     }
  96.     public function setDescription(string $description): self
  97.     {
  98.         $this->description $description;
  99.         return $this;
  100.     }
  101.     public function getState(): ?string
  102.     {
  103.         return $this->state;
  104.     }
  105.     public function setState(string $state): self
  106.     {
  107.         $this->state $state;
  108.         return $this;
  109.     }
  110.     public function getTimeCreated(): ?\DateTimeInterface
  111.     {
  112.         return $this->timeCreated;
  113.     }
  114.     public function setTimeCreated(?\DateTimeInterface $timeCreated): self
  115.     {
  116.         $this->timeCreated $timeCreated;
  117.         return $this;
  118.     }
  119.     public function getTimePaid(): ?\DateTimeInterface
  120.     {
  121.         return $this->timePaid;
  122.     }
  123.     public function setTimePaid(?\DateTimeInterface $timePaid): self
  124.     {
  125.         $this->timePaid $timePaid;
  126.         return $this;
  127.     }
  128.     public function getUserCustomer(): ?User
  129.     {
  130.         return $this->userCustomer;
  131.     }
  132.     public function setUserCustomer(?User $userCustomer): self
  133.     {
  134.         $this->userCustomer $userCustomer;
  135.         return $this;
  136.     }
  137.     public function getUserCreated(): ?User
  138.     {
  139.         return $this->userCreated;
  140.     }
  141.     public function setUserCreated(?User $userCreated): self
  142.     {
  143.         $this->userCreated $userCreated;
  144.         return $this;
  145.     }
  146.     public function getPaymentCode(): ?string
  147.     {
  148.         return $this->paymentCode;
  149.     }
  150.     public function setPaymentCode(string $paymentCode): self
  151.     {
  152.         $this->paymentCode $paymentCode;
  153.         return $this;
  154.     }
  155.     public function getAdmissionUser(): ?AdmissionUser
  156.     {
  157.         return $this->admissionUser;
  158.     }
  159.     public function setAdmissionUser(?AdmissionUser $admissionUser): self
  160.     {
  161.         $this->admissionUser $admissionUser;
  162.         return $this;
  163.     }
  164.     public function getLastLog(): ?PaymentLog
  165.     {
  166.         return $this->lastLog;
  167.     }
  168.     public function setLastLog(?PaymentLog $lastLog): self
  169.     {
  170.         $this->lastLog $lastLog;
  171.         return $this;
  172.     }
  173.     public function getNote(): ?string
  174.     {
  175.         return $this->note;
  176.     }
  177.     public function setNote(string $note): self
  178.     {
  179.         $this->note $note;
  180.         return $this;
  181.     }
  182. }