Sin descripción

FeatureFlagEntity.php 1.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <?php
  2. namespace MailPoet\Entities;
  3. if (!defined('ABSPATH')) exit;
  4. use MailPoet\Doctrine\EntityTraits\AutoincrementedIdTrait;
  5. use MailPoet\Doctrine\EntityTraits\CreatedAtTrait;
  6. use MailPoet\Doctrine\EntityTraits\UpdatedAtTrait;
  7. use MailPoetVendor\Doctrine\ORM\Mapping as ORM;
  8. /**
  9. * @ORM\Entity()
  10. * @ORM\Table(name="feature_flags", uniqueConstraints={@ORM\UniqueConstraint(name="name",columns={"name"})})
  11. */
  12. class FeatureFlagEntity {
  13. use AutoincrementedIdTrait;
  14. use CreatedAtTrait;
  15. use UpdatedAtTrait;
  16. /**
  17. * @ORM\Column(type="string", nullable=false, unique=true)
  18. * @var string
  19. */
  20. private $name;
  21. /**
  22. * @ORM\Column(type="boolean", nullable=true)
  23. * @var bool|null
  24. */
  25. private $value;
  26. /**
  27. * @param string $name
  28. * @param bool|null $value
  29. */
  30. public function __construct(
  31. $name,
  32. $value = null
  33. ) {
  34. $this->name = $name;
  35. $this->value = $value;
  36. }
  37. /** @return string */
  38. public function getName() {
  39. return $this->name;
  40. }
  41. /** @param string $name */
  42. public function setName($name) {
  43. $this->name = $name;
  44. }
  45. /** @return bool|null */
  46. public function getValue() {
  47. return $this->value;
  48. }
  49. /** @param bool|null $value */
  50. public function setValue($value) {
  51. $this->value = $value;
  52. }
  53. }