src/CoreBundle/Entity/PublisherPermission.php line 12

Open in your IDE?
  1. <?php
  2. namespace CoreBundle\Entity;
  3. use UserBundle\Entity\User;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6. * @ORM\Table("publisher_permission")
  7. * @ORM\Entity(repositoryClass="CoreBundle\Entity\PublisherPermissionRepository")
  8. */
  9. class PublisherPermission
  10. {
  11. /**
  12. * @var int
  13. *
  14. * @ORM\Column(name="id", type="integer")
  15. * @ORM\Id
  16. * @ORM\GeneratedValue(strategy="AUTO")
  17. */
  18. private int $id;
  19. /**
  20. * @var User
  21. *
  22. * @ORM\ManyToOne(targetEntity="UserBundle\Entity\User")
  23. * @ORM\JoinColumn(referencedColumnName="id", nullable=false, onDelete="CASCADE")
  24. */
  25. private User $user;
  26. /**
  27. * @var Publisher
  28. *
  29. * @ORM\ManyToOne(targetEntity="CoreBundle\Entity\Publisher")
  30. * @ORM\JoinColumn(referencedColumnName="id", nullable=false, onDelete="CASCADE")
  31. */
  32. private Publisher $publisher;
  33. /**
  34. * @var Publication|null
  35. *
  36. * @ORM\ManyToOne(targetEntity="CoreBundle\Entity\Publication")
  37. * @ORM\JoinColumn(referencedColumnName="id", nullable=true, onDelete="SET NULL")
  38. */
  39. private ?Publication $publication;
  40. /**
  41. * @var bool
  42. *
  43. * @ORM\Column(name="editor_permission", type="boolean")
  44. */
  45. private bool $editorPermission;
  46. public function getId(): int
  47. {
  48. return $this->id;
  49. }
  50. public function setId(int $id): void
  51. {
  52. $this->id = $id;
  53. }
  54. public function getUser(): User
  55. {
  56. return $this->user;
  57. }
  58. public function setUser(User $user): void
  59. {
  60. $this->user = $user;
  61. }
  62. public function getPublisher(): Publisher
  63. {
  64. return $this->publisher;
  65. }
  66. public function setPublisher(Publisher $publisher): void
  67. {
  68. $this->publisher = $publisher;
  69. }
  70. public function getPublication(): ?Publication
  71. {
  72. return $this->publication;
  73. }
  74. public function setPublication(?Publication $publication): void
  75. {
  76. $this->publication = $publication;
  77. }
  78. public function isEditorPermission(): bool
  79. {
  80. return $this->editorPermission;
  81. }
  82. public function setEditorPermission(bool $editorPermission): void
  83. {
  84. $this->editorPermission = $editorPermission;
  85. }
  86. }