src/CoreBundle/Entity/Publisher.php line 12

Open in your IDE?
  1. <?php
  2. namespace CoreBundle\Entity;
  3. use Doctrine\Common\Collections\Collection;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6. * @ORM\Table("publisher")
  7. * @ORM\Entity(repositoryClass="CoreBundle\Entity\PublisherRepository")
  8. */
  9. class Publisher
  10. {
  11. /**
  12. * @var int
  13. *
  14. * @ORM\Column(name="id", type="integer")
  15. * @ORM\Id
  16. */
  17. private int $id;
  18. /**
  19. * @var string
  20. *
  21. * @ORM\Column(name="customer_id", type="string", length=255, unique=true)
  22. */
  23. private string $customerId;
  24. /**
  25. * @var string
  26. *
  27. * @ORM\Column(name="name", type="string", length=255, nullable=false)
  28. */
  29. private string $name;
  30. /**
  31. * @var int
  32. *
  33. * @ORM\Column
  34. */
  35. private int $timestamp;
  36. /**
  37. * @var bool
  38. *
  39. * @ORM\Column
  40. */
  41. private bool $deleted;
  42. /**
  43. * @var bool
  44. *
  45. * @ORM\Column
  46. */
  47. private bool $hidden;
  48. /**
  49. * @var Collection
  50. *
  51. * @ORM\OneToMany(targetEntity="Publication", mappedBy="publisher", cascade={"persist"})
  52. */
  53. private Collection $publications;
  54. public function getId(): int
  55. {
  56. return $this->id;
  57. }
  58. public function setId(int $id): void
  59. {
  60. $this->id = $id;
  61. }
  62. public function getName(): string
  63. {
  64. return $this->name;
  65. }
  66. public function getDisplayName(): string
  67. {
  68. return $this->name === '' ? $this->customerId : $this->name;
  69. }
  70. public function setName(string $name): void
  71. {
  72. $this->name = $name;
  73. }
  74. public function __toString(): string
  75. {
  76. return $this->name;
  77. }
  78. public function getPublications(): Collection
  79. {
  80. return $this->publications;
  81. }
  82. public function setPublications(Collection $publications): void
  83. {
  84. $this->publications = $publications;
  85. }
  86. public function getCustomerId(): string
  87. {
  88. return $this->customerId;
  89. }
  90. public function setCustomerId(string $customerId): void
  91. {
  92. $this->customerId = $customerId;
  93. }
  94. public function getTimestamp(): int
  95. {
  96. return $this->timestamp;
  97. }
  98. public function setTimestamp(int $timestamp): void
  99. {
  100. $this->timestamp = $timestamp;
  101. }
  102. public function isDeleted(): bool
  103. {
  104. return $this->deleted;
  105. }
  106. public function setDeleted(bool $deleted): void
  107. {
  108. $this->deleted = $deleted;
  109. }
  110. public function isHidden(): bool
  111. {
  112. return $this->hidden;
  113. }
  114. public function setHidden(bool $hidden): void
  115. {
  116. $this->hidden = $hidden;
  117. }
  118. }