FamilyQuotientBand.php 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. <?php
  2. declare(strict_types=1);
  3. namespace App\Entity\Billing;
  4. use ApiPlatform\Metadata\ApiResource;
  5. use App\Entity\Product\IntangibleDiscountDetail;
  6. use DateTimeInterface;
  7. use Doctrine\Common\Collections\Collection;
  8. use Doctrine\ORM\Mapping as ORM;
  9. #[ApiResource(operations: [])]
  10. #[ORM\Entity]
  11. class FamilyQuotientBand
  12. {
  13. #[ORM\Id]
  14. #[ORM\Column]
  15. #[ORM\GeneratedValue]
  16. private int $id;
  17. #[ORM\ManyToOne(targetEntity: FamilyQuotientModel::class, cascade: [], inversedBy: 'familyQuotientBands')]
  18. #[ORM\JoinColumn(referencedColumnName: 'id', nullable: false, onDelete: 'SET NULL')]
  19. protected mixed $familyQuotientModel;
  20. #[ORM\OneToMany(
  21. mappedBy: 'familyQuotientBand',
  22. targetEntity: FamilyQuotientBandDetail::class,
  23. cascade: ['persist'],
  24. orphanRemoval: true,
  25. )]
  26. protected Collection $familyQuotientBandDetails;
  27. #[ORM\OneToMany(mappedBy: 'familyQuotientBand', targetEntity: IntangibleDiscountDetail::class, cascade: [], orphanRemoval: true)]
  28. protected Collection $intangibleDiscountDetails;
  29. function getId(): int
  30. {
  31. return $this->id;
  32. }
  33. function setId(int $id): self
  34. {
  35. $this->id = $id;
  36. return $this;
  37. }
  38. function getFamilyQuotientModel(): mixed
  39. {
  40. return $this->familyQuotientModel;
  41. }
  42. function setFamilyQuotientModel(mixed $familyQuotientModel): self
  43. {
  44. $this->familyQuotientModel = $familyQuotientModel;
  45. return $this;
  46. }
  47. function getFamilyQuotientBandDetails(): Collection
  48. {
  49. return $this->familyQuotientBandDetails;
  50. }
  51. function setFamilyQuotientBandDetails(Collection $familyQuotientBandDetails): self
  52. {
  53. $this->familyQuotientBandDetails = $familyQuotientBandDetails;
  54. return $this;
  55. }
  56. function getIntangibleDiscountDetails(): Collection
  57. {
  58. return $this->intangibleDiscountDetails;
  59. }
  60. function setIntangibleDiscountDetails(Collection $intangibleDiscountDetails): self
  61. {
  62. $this->intangibleDiscountDetails = $intangibleDiscountDetails;
  63. return $this;
  64. }
  65. }