src/Entity/TrainingRank.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\TrainingRankRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * @ORM\Table(name="training_rank")
  7.  * @ORM\Entity(repositoryClass=TrainingRankRepository::class)
  8.  */
  9. class TrainingRank
  10. {
  11.     /**
  12.      * @ORM\Id
  13.      * @ORM\GeneratedValue
  14.      * @ORM\Column(type="integer")
  15.      */
  16.     private $id;
  17.     /**
  18.      * @ORM\ManyToOne(targetEntity=Training::class, inversedBy="trainingRanks")
  19.      * @ORM\JoinColumn(nullable=false)
  20.      */
  21.     private $training;
  22.     /**
  23.      * @ORM\ManyToOne(targetEntity=Rank::class, inversedBy="trainingRanks")
  24.      * @ORM\JoinColumn(nullable=false)
  25.      */
  26.     private $rank;
  27.     public function getId(): ?int
  28.     {
  29.         return $this->id;
  30.     }
  31.     public function getTraining(): ?Training
  32.     {
  33.         return $this->training;
  34.     }
  35.     public function setTraining(?Training $training): self
  36.     {
  37.         $this->training $training;
  38.         return $this;
  39.     }
  40.     public function getRank(): ?Rank
  41.     {
  42.         return $this->rank;
  43.     }
  44.     public function setRank(?Rank $rank): self
  45.     {
  46.         $this->rank $rank;
  47.         return $this;
  48.     }
  49. }