vendor/croisiland/common-bundle/src/Entity/Cabin/CabinCategoryCharacteristicValue.php line 26

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace Croisiland\CommonBundle\Entity\Cabin;
  4. use Crea\ToolsBundle\Entity\LifecycleUserIdentifierTrait;
  5. use Croisiland\CommonBundle\Repository\Cabin\CabinCategoryCharacteristicValueRepository;
  6. use Croisiland\CommonBundle\Annotation\Cabin\CabinCategoryCharacteristicValueFormValidator;
  7. use Doctrine\ORM\Mapping as ORM;
  8. /**
  9. * @ORM\Entity(repositoryClass=CabinCategoryCharacteristicValueRepository::class)
  10. * @ORM\Table(
  11. * name="cabin_category_characteristic_value",
  12. * uniqueConstraints={
  13. * @ORM\UniqueConstraint(
  14. * name="unique_cabin_category_characteristic_pair",
  15. * columns={"cabin_category_id", "cabin_category_characteristic_id"}
  16. * )
  17. * }
  18. * )
  19. * @CabinCategoryCharacteristicValueFormValidator(groups={"cabin_category_characteristic_value_form_validator"})
  20. */
  21. class CabinCategoryCharacteristicValue
  22. {
  23. use LifecycleUserIdentifierTrait;
  24. /**
  25. * @ORM\Id
  26. * @ORM\GeneratedValue
  27. * @ORM\Column(type="integer")
  28. */
  29. private ?int $id = null;
  30. /**
  31. * Catégorie de cabine concernée par cette valeur.
  32. *
  33. * @ORM\ManyToOne(targetEntity="CabinCategory", inversedBy="cabinCategoryCharacteristicValues")
  34. * @ORM\JoinColumn(nullable=false)
  35. */
  36. private ?CabinCategory $cabinCategory;
  37. /**
  38. * Caractéristique associée à cette valeur.
  39. *
  40. * @ORM\ManyToOne(targetEntity="CabinCategoryCharacteristic", inversedBy="cabinCategoryCharacteristicValues")
  41. * @ORM\JoinColumn(nullable=false)
  42. */
  43. private ?CabinCategoryCharacteristic $cabinCategoryCharacteristic;
  44. /**
  45. * Valeur minimum de la caractéristique (ex: "20", "4", "true").
  46. * Stockée en string pour permettre une flexibilité (nombres, booléens, texte).
  47. *
  48. * @ORM\Column(type="string", length=255, nullable=true)
  49. */
  50. private ?string $valueMin = null;
  51. /**
  52. * Valeur maximum de la caractéristique (ex: "20", "4", "true").
  53. * Stockée en string pour permettre une flexibilité (nombres, booléens, texte).
  54. *
  55. * @ORM\Column(type="string", length=255, nullable=true)
  56. */
  57. private ?string $valueMax = null;
  58. public function getId(): ?int
  59. {
  60. return $this->id;
  61. }
  62. public function getCabinCategory(): ?CabinCategory
  63. {
  64. return $this->cabinCategory;
  65. }
  66. public function setCabinCategory(?CabinCategory $cabinCategory): self
  67. {
  68. $this->cabinCategory = $cabinCategory;
  69. return $this;
  70. }
  71. public function getCabinCategoryCharacteristic(): ?CabinCategoryCharacteristic
  72. {
  73. return $this->cabinCategoryCharacteristic;
  74. }
  75. public function setCabinCategoryCharacteristic(?CabinCategoryCharacteristic $cabinCategoryCharacteristic): self
  76. {
  77. $this->cabinCategoryCharacteristic = $cabinCategoryCharacteristic;
  78. return $this;
  79. }
  80. public function getValueMin(): ?string
  81. {
  82. return $this->valueMin;
  83. }
  84. public function setValueMin(?string $valueMin): self
  85. {
  86. $this->valueMin = $valueMin;
  87. return $this;
  88. }
  89. public function getValueMax(): ?string
  90. {
  91. return $this->valueMax;
  92. }
  93. public function setValueMax(?string $valueMax): self
  94. {
  95. $this->valueMax = $valueMax;
  96. return $this;
  97. }
  98. }