src/Entity/Messaging/CenterTeam.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Messaging;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Symfony\Component\Validator\Constraints as Assert;
  5. /**
  6.  * @ORM\Entity(repositoryClass="App\Repository\App\Messaging\CenterTeamRepository")
  7.  */
  8. class CenterTeam
  9. {
  10.     /**
  11.      * @ORM\Id
  12.      * @ORM\GeneratedValue
  13.      * @ORM\Column(type="integer")
  14.      */
  15.     protected $id;
  16.     /**
  17.      * @ORM\Column(type="string")
  18.      * @Assert\NotBlank
  19.      */
  20.     protected $centerCode;
  21.     /**
  22.      * @ORM\ManyToOne(targetEntity="App\Entity\Messaging\Team")
  23.      * @ORM\JoinColumn(nullable=false)
  24.      */
  25.     protected $team;
  26.     public function __construct(string $centerCode)
  27.     {
  28.         $this->centerCode $centerCode;
  29.     }
  30.     public function getId(): ?int
  31.     {
  32.         return $this->id;
  33.     }
  34.     public function getCenterCode(): string
  35.     {
  36.         return $this->centerCode;
  37.     }
  38.     public function setCenterCode(string $centerCode): self
  39.     {
  40.         $this->centerCode $centerCode;
  41.         return $this;
  42.     }
  43.     public function getTeam(): ?Team
  44.     {
  45.         return $this->team;
  46.     }
  47.     public function setTeam(?Team $team): self
  48.     {
  49.         $this->team $team;
  50.         return $this;
  51.     }
  52. }