src/Entity/SaleOrderParticipant.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\SaleOrderParticipantRepository;
  4. use App\Traits\DateTrait;
  5. use DateTimeInterface;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use JMS\Serializer\Annotation\Expose;
  8. use JMS\Serializer\Annotation\Groups;
  9. /**
  10. * @ORM\Entity(repositoryClass=SaleOrderParticipantRepository::class)
  11. */
  12. class SaleOrderParticipant
  13. {
  14. use DateTrait;
  15. public const A = "adulte";
  16. public const E = "enfant";
  17. /**
  18. * @ORM\Id
  19. * @ORM\GeneratedValue
  20. * @ORM\Column(type="integer")
  21. */
  22. private $id;
  23. /**
  24. * @ORM\Column(type="string", length=255)
  25. *
  26. * @Expose
  27. * @Groups({"sale_order:item", "sale_oder_item:list", "sale_order:post", "get:read","export_order_datatable"})
  28. */
  29. private ?string $lastName;
  30. /**
  31. * @ORM\Column(type="string", length=255)
  32. *
  33. * @Expose
  34. * @Groups({"sale_order:item", "sale_oder_item:list", "sale_order:post", "get:read","export_order_datatable"})
  35. */
  36. private ?string $firstName;
  37. /**
  38. * @ORM\Column(type="string", length=1)
  39. *
  40. * @Expose
  41. * @Groups({"sale_order:item", "sale_oder_item:list", "sale_order:post", "get:read","export_order_datatable"})
  42. */
  43. private ?string $typeParticipant;
  44. /**
  45. * @ORM\ManyToOne(targetEntity=SaleOrderItem::class, inversedBy="participants")
  46. * @ORM\JoinColumn(nullable=false, name="sale_order_item_id")
  47. */
  48. private ?SaleOrderItem $saleOrderItem = null;
  49. /**
  50. * @ORM\Column(type="date", nullable=true)
  51. *
  52. * @Expose
  53. * @Groups({"sale_order:item", "sale_oder_item:list", "sale_order:post", "get:read","export_order_datatable"})
  54. */
  55. private ?DateTimeInterface $birthDate;
  56. public function getId(): ?int
  57. {
  58. return $this->id;
  59. }
  60. public function getLastName(): ?string
  61. {
  62. return $this->lastName;
  63. }
  64. public function setLastName(string $lastName): self
  65. {
  66. $this->lastName = $lastName;
  67. return $this;
  68. }
  69. public function getFirstName(): ?string
  70. {
  71. return $this->firstName;
  72. }
  73. public function setFirstName(string $firstName): self
  74. {
  75. $this->firstName = $firstName;
  76. return $this;
  77. }
  78. public function getTypeParticipant(): ?string
  79. {
  80. return $this->typeParticipant;
  81. }
  82. public function setTypeParticipant(string $typeParticipant): self
  83. {
  84. $this->typeParticipant = $typeParticipant;
  85. return $this;
  86. }
  87. public function getBirthDate(): ?DateTimeInterface
  88. {
  89. return $this->birthDate;
  90. }
  91. public function setBirthDate(?DateTimeInterface $birthDate): self
  92. {
  93. $this->birthDate = $birthDate;
  94. return $this;
  95. }
  96. public function getSaleOrderItem(): ?SaleOrderItem
  97. {
  98. return $this->saleOrderItem;
  99. }
  100. public function setSaleOrderItem(?SaleOrderItem $saleOrderItem): self
  101. {
  102. $this->saleOrderItem = $saleOrderItem;
  103. return $this;
  104. }
  105. }