src/Entity/Contribution.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ContributionRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * @ORM\Entity(repositoryClass=ContributionRepository::class)
  7.  */
  8. class Contribution
  9. {
  10.     const RESOURCE_KEY 'contributions';
  11.     /**
  12.      * @ORM\Id
  13.      * @ORM\GeneratedValue
  14.      * @ORM\Column(type="integer")
  15.      */
  16.     private $id;
  17.     /**
  18.      * @ORM\ManyToOne(targetEntity=Journal::class, inversedBy="contributions")
  19.      * @ORM\JoinColumn(nullable=false)
  20.      */
  21.     private $journal;
  22.     /**
  23.      * @ORM\ManyToOne(targetEntity=User::class, inversedBy="contributions")
  24.      * @ORM\JoinColumn(nullable=false)
  25.      */
  26.     private $author;
  27.     /**
  28.      * @ORM\Column(type="json")
  29.      */
  30.     private $data = [];
  31.     /**
  32.      * @ORM\Column(type="boolean", nullable=true)
  33.      */
  34.     private $approved;
  35.     public function getId(): ?int
  36.     {
  37.         return $this->id;
  38.     }
  39.     public function getJournal(): ?Journal
  40.     {
  41.         return $this->journal;
  42.     }
  43.     public function setJournal(?Journal $journal): self
  44.     {
  45.         $this->journal $journal;
  46.         return $this;
  47.     }
  48.     public function getAuthor(): ?User
  49.     {
  50.         return $this->author;
  51.     }
  52.     public function setAuthor(?User $author): self
  53.     {
  54.         $this->author $author;
  55.         return $this;
  56.     }
  57.     public function getData(): ?array
  58.     {
  59.         return $this->data;
  60.     }
  61.     public function setData(array $data): self
  62.     {
  63.         $this->data $data;
  64.         return $this;
  65.     }
  66.     public function getApproved(): ?bool
  67.     {
  68.         return $this->approved;
  69.     }
  70.     public function setApproved(?bool $approved): self
  71.     {
  72.         $this->approved $approved;
  73.         return $this;
  74.     }
  75. }