src/Entity/Player.php line 25

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Entity\Translation\PlayerTranslation;
  4. use App\Repository\PlayerRepository;
  5. use DateTime;
  6. use Doctrine\Common\Collections\ArrayCollection;
  7. use Doctrine\Common\Collections\Collection;
  8. use Doctrine\ORM\Mapping as ORM;
  9. use Gedmo\Mapping\Annotation as Gedmo;
  10. use Symfony\Component\HttpFoundation\File\File;
  11. use Symfony\Component\HttpFoundation\File\UploadedFile;
  12. use Symfony\Component\Serializer\Annotation\Groups;
  13. use Symfony\Component\Serializer\Annotation\Ignore;
  14. use Vich\UploaderBundle\Mapping\Annotation as Vich;
  15. use Symfony\Component\Validator\Constraints as Assert;
  16. /**
  17.  * @ORM\Entity(repositoryClass=PlayerRepository::class)
  18.  * @Gedmo\TranslationEntity(class="App\Entity\Translation\PlayerTranslation")
  19.  * @Gedmo\SoftDeleteable(fieldName="deletedAt", timeAware=false, hardDelete=true)
  20.  * @Vich\Uploadable
  21.  */
  22. class Player
  23. {
  24.     use SetTranslationsTrait;
  25.     public const FIELDS = [
  26.         'game',
  27.         'birthPlace'
  28.     ];
  29.     /**
  30.      * @ORM\Id
  31.      * @ORM\GeneratedValue
  32.      * @ORM\Column(type="integer")
  33.      * @Groups({"player:list", "player:item","atpmatch_result:list","atpmatch_result:item","round:list", "round:item","drawline:list", "drawline:item","event:list","event:item"})
  34.      */
  35.     private $id;
  36.     /**
  37.      * @ORM\Column(type="string", length=255)
  38.      * @Groups({"player:list", "player:item","atpmatch_result:list","atpmatch_result:item","round:list", "round:item","drawline:list", "drawline:item","event:list","event:item"})
  39.      */
  40.     private $name;
  41.     /**
  42.      * @ORM\Column(type="string", length=255)
  43.      * @Groups({"player:list", "player:item","atpmatch_result:list", "atpmatch_result:item","round:list","round:item","drawline:list", "drawline:item","event:list","event:item"})
  44.      */
  45.     private $surname;
  46.     /**
  47.      * @ORM\Column(type="integer",nullable=true)
  48.      * @Groups({"player:list", "player:item","atpmatch_result:list", "atpmatch_result:item","event:list","event:item"})
  49.      */
  50.     private $ranking;
  51.     /**
  52.      * @ORM\Column(type="string", nullable=true)
  53.      * @Groups({"player:list", "player:item","atpmatch_result:list", "atpmatch_result:item", "atpmatch_result:list", "atpmatch_result:item"})
  54.      */
  55.     private $weight;
  56.     /**
  57.      * @ORM\Column(type="string",nullable=true)
  58.      * @Groups({"player:list", "player:item","atpmatch_result:list", "atpmatch_result:item", "atpmatch_result:list", "atpmatch_result:item"})
  59.      */
  60.     private $height;
  61.     /**
  62.      * @ORM\Column(type="string")
  63.      * @Groups({"player:list", "player:item","round:list", "round:item"})
  64.      * @var string|null
  65.      *
  66.      */
  67.     private $imageName;
  68.     /**
  69.      * @ORM\Column(type="integer")
  70.      *
  71.      * @var int|null
  72.      * @Ignore()
  73.      */
  74.     private $imageSize;
  75.     /**
  76.      * @ORM\Column(type="string")
  77.      * @Groups({"player:list", "player:item"})
  78.      * @var string|null
  79.      *
  80.      */
  81.     private $thumbnailName;
  82.     /**
  83.      * @ORM\Column(type="integer")
  84.      *
  85.      * @var int|null
  86.      * @Ignore()
  87.      */
  88.     private $thumbnailSize;
  89.     /**
  90.      * @ORM\ManyToOne(targetEntity=Country::class, inversedBy="players")
  91.      * @Groups({"atpmatch_result:list", "atpmatch_result:item","player:list", "player:item","round:list", "round:item","event:list","event:item"})
  92.      * @ORM\JoinColumn(nullable=false)
  93.      */
  94.     private $country;
  95.     /**
  96.      * @ORM\ManyToMany(targetEntity=User::class, mappedBy="favoritePlayers")
  97.      * @Ignore()
  98.      */
  99.     private $users;
  100.     /**
  101.      * @ORM\Column(type="datetime", nullable=true)
  102.      * @Groups({"player:list", "player:item"})
  103.      * @var DateTime|null
  104.      */
  105.     protected $deletedAt;
  106.     /**
  107.      * @var bool
  108.      * @Groups("player:list", "player:item")
  109.      */
  110.     private $isFavorite false;
  111.     /**
  112.      * @var DateTime
  113.      * @Gedmo\Timestampable(on="create")
  114.      * @ORM\Column(type="datetime")
  115.      * @Groups({"player:list", "player:item"})
  116.      */
  117.     protected $createdAt;
  118.     /**
  119.      * @var DateTime
  120.      * @Gedmo\Timestampable(on="update")
  121.      * @ORM\Column(type="datetime")
  122.      * @Groups({"player:list", "player:item"})
  123.      */
  124.     protected $updatedAt;
  125.     /**
  126.      * @Assert\File(
  127.      *     mimeTypes = {"image/jpeg", "image/gif", "image/png", "image/jpg"},
  128.      *     mimeTypesMessage = "Wrong file type (jpeg,gif,png,jpg)"
  129.      * )
  130.      * @Vich\UploadableField(mapping="player", fileNameProperty="imageName", size="imageSize")
  131.      * @var File|null
  132.      */
  133.     private $imageFile;
  134.     /**
  135.      * @Assert\File(
  136.      *     mimeTypes = {"image/jpeg", "image/gif", "image/png", "image/jpg"},
  137.      *     mimeTypesMessage = "Wrong file type (jpeg,gif,png,jpg)"
  138.      * )
  139.      * @Vich\UploadableField(mapping="player", fileNameProperty="thumbnailName", size="thumbnailSize")
  140.      * @var File|null
  141.      */
  142.     private $thumbnailFile;
  143.     /**
  144.      * @ORM\Column(type="string", length=255, nullable=true)
  145.      * @Gedmo\Translatable
  146.      * @Groups({"player:list", "player:item"})
  147.      */
  148.     private $game;
  149.     /**
  150.      * @var string
  151.      * @Ignore()
  152.      */
  153.     private $gameEn;
  154.     /**
  155.      * @var string
  156.      * @Ignore()
  157.      */
  158.     private $gameCa;
  159.     /**
  160.      * @ORM\Column(type="string", length=255, nullable=true)
  161.      * @Groups({"player:list", "player:item"})
  162.      *
  163.      */
  164.     private $professionalSince;
  165.     /**
  166.      * @ORM\Column(type="string", length=255, nullable=true)
  167.      * @Groups({"player:list", "player:item"})
  168.      */
  169.     private $coach;
  170.     /**
  171.      * @ORM\Column(type="string", length=255, nullable=true)
  172.      * @Gedmo\Translatable
  173.      * @Groups({"player:list", "player:item"})
  174.      */
  175.     private $birthPlace;
  176.     /**
  177.      * @var string
  178.      * @Ignore()
  179.      */
  180.     private $birthPlaceEn;
  181.     /**
  182.      * @var string
  183.      * @Ignore()
  184.      */
  185.     private $birthPlaceCa;
  186.     /**
  187.      * @ORM\Column(type="string", length=255, nullable=true)
  188.      * @Groups({"player:list", "player:item"})
  189.      */
  190.     private $residence;
  191.     /**
  192.      * @Gedmo\Locale
  193.      * @Groups("player:list", "player:item")
  194.      */
  195.     private $locale;
  196.     /**
  197.      * @ORM\OneToMany(
  198.      *   targetEntity="App\Entity\Translation\PlayerTranslation",
  199.      *   mappedBy="object",
  200.      *   cascade={"persist", "remove"}
  201.      * )
  202.      * @Ignore()
  203.      */
  204.     private $translations;
  205.     /**
  206.      * @ORM\Column(type="integer", nullable=true)
  207.      * @Groups({"player:list", "player:item"})
  208.      */
  209.     private $maxRanking;
  210.     /**
  211.      * @ORM\Column(type="integer", nullable=true)
  212.      * @Groups({"player:list", "player:item"})
  213.      */
  214.     private $age;
  215.     /**
  216.      * @ORM\Column(type="string", length=255, nullable=true)
  217.      * @Groups({"atpmatch_result:list", "atpmatch_result:item","player:list", "player:item","round:list", "round:item","event:list","event:item"})
  218.      */
  219.     private $apiId;
  220.     /**
  221.      * @ORM\Column(type="string", length=32, nullable=true)
  222.      * @Groups({"player:list", "player:item"})
  223.      */
  224.     private $gender;
  225.     /**
  226.      * @ORM\Column(type="string", length=64, nullable=true)
  227.      * @Groups({"player:list", "player:item"})
  228.      */
  229.     private $playHand;
  230.     /**
  231.      * @ORM\Column(type="string", length=64, nullable=true)
  232.      * @Groups({"player:list", "player:item"})
  233.      */
  234.     private $backHand;
  235.     /**
  236.      * @ORM\Column(type="integer", nullable=true)
  237.      * @Groups({"player:list", "player:item"})
  238.      */
  239.     private $careerPrizeMoney;
  240.     /**
  241.      * @ORM\Column(type="integer", nullable=true)
  242.      * @Groups({"player:list", "player:item"})
  243.      */
  244.     private $careerTitles;
  245.     /**
  246.      * @ORM\Column(type="integer", nullable=true)
  247.      * @Groups({"player:list", "player:item"})
  248.      */
  249.     private $careerWins;
  250.     /**
  251.      * @ORM\Column(type="integer", nullable=true)
  252.      * @Groups({"player:list", "player:item"})
  253.      */
  254.     private $careerLosses;
  255.     /**
  256.      * @ORM\Column(type="boolean", nullable=true)
  257.      * @Groups({"player:list", "player:item"})
  258.      */
  259.     private $alternate;
  260.     /**
  261.      * @ORM\Column(type="string", length=255, nullable=true)
  262.      * @Groups({"player:list", "player:item"})
  263.      */
  264.     private $seed;
  265.     /**
  266.      * @ORM\Column(type="string", length=255, nullable=true)
  267.      * @Groups({"player:list", "player:item"})
  268.      *
  269.      */
  270.     private $entryCode;
  271.     /**
  272.      * @ORM\OneToMany(targetEntity=MatchTeam::class, mappedBy="players")
  273.      * @Ignore()
  274.      */
  275.     private $matchTeams;
  276.     /**
  277.      * @ORM\OneToMany(targetEntity=TeamPlayer::class, mappedBy="player")
  278.      */
  279.     private $teamPlayers;
  280.     /**
  281.      * @ORM\ManyToMany(targetEntity=DrawLine::class, mappedBy="players")
  282.      */
  283.     private $drawLines;
  284.     /**
  285.      * @ORM\OneToMany(targetEntity=TeamPlayer::class, mappedBy="partner")
  286.      */
  287.     private $teamPlayerPartner;
  288.     /**
  289.      * @ORM\Column(type="integer", nullable=true)
  290.      */
  291.     private $orderInTeam;
  292.     /**
  293.      * @ORM\OneToMany(targetEntity=RoundResultTeam::class, mappedBy="player")
  294.      */
  295.     private $roundResultTeamPlayer;
  296.     /**
  297.      * @ORM\OneToMany(targetEntity=RoundResultTeam::class, mappedBy="partner")
  298.      */
  299.     private $roundResultTeamPartner;
  300.     /**
  301.      * @ORM\Column(type="string", length=255, nullable=true)
  302.      * @var string|null
  303.      *
  304.      * @Ignore()
  305.      */
  306.     private $imageNameEn;
  307.     /**
  308.      * @ORM\Column(type="integer", nullable=true)
  309.      *
  310.      * @var int|null
  311.      * @Ignore()
  312.      */
  313.     private $imageSizeEn;
  314.     /**
  315.      * @ORM\Column(type="string", length=255, nullable=true)
  316.      * @var string|null
  317.      *
  318.      * @Ignore()
  319.      */
  320.     private $imageNameCa;
  321.     /**
  322.      * @ORM\Column(type="integer", nullable=true)
  323.      *
  324.      * @var int|null
  325.      * @Ignore()
  326.      */
  327.     private $imageSizeCa;
  328.     /**
  329.      * @ORM\Column(type="string", length=255, nullable=true)
  330.      * @var string|null
  331.      *
  332.      * @Ignore()
  333.      */
  334.     private $thumbnailNameEn;
  335.     /**
  336.      * @ORM\Column(type="integer", nullable=true)
  337.      *
  338.      * @var int|null
  339.      * @Ignore()
  340.      */
  341.     private $thumbnailSizeEn;
  342.     /**
  343.      * @ORM\Column(type="string", length=255, nullable=true)
  344.      * @var string|null
  345.      *
  346.      * @Ignore()
  347.      */
  348.     private $thumbnailNameCa;
  349.     /**
  350.      * @ORM\Column(type="integer", nullable=true)
  351.      *
  352.      * @var int|null
  353.      * @Ignore()
  354.      */
  355.     private $thumbnailSizeCa;
  356.     /**
  357.      * @Assert\File(
  358.      *     mimeTypes = {"image/jpeg", "image/gif", "image/png", "image/jpg"},
  359.      *     mimeTypesMessage = "Wrong file type (jpeg,gif,png,jpg)"
  360.      * )
  361.      * @Vich\UploadableField(mapping="player", fileNameProperty="imageNameEn", size="imageSizeEn")
  362.      * @var File|null
  363.      */
  364.     private $imageFileEn;
  365.     /**
  366.      * @Assert\File(
  367.      *     mimeTypes = {"image/jpeg", "image/gif", "image/png", "image/jpg"},
  368.      *     mimeTypesMessage = "Wrong file type (jpeg,gif,png,jpg)"
  369.      * )
  370.      * @Vich\UploadableField(mapping="player", fileNameProperty="imageNameCa", size="imageSizeCa")
  371.      * @var File|null
  372.      */
  373.     private $imageFileCa;
  374.     /**
  375.      * @Assert\File(
  376.      *     mimeTypes = {"image/jpeg", "image/gif", "image/png", "image/jpg"},
  377.      *     mimeTypesMessage = "Wrong file type (jpeg,gif,png,jpg)"
  378.      * )
  379.      * @Vich\UploadableField(mapping="player", fileNameProperty="thumbnailNameEn", size="thumbnailSizeEn")
  380.      * @var File|null
  381.      */
  382.     private $thumbnailFileEn;
  383.     /**
  384.      * @Assert\File(
  385.      *     mimeTypes = {"image/jpeg", "image/gif", "image/png", "image/jpg"},
  386.      *     mimeTypesMessage = "Wrong file type (jpeg,gif,png,jpg)"
  387.      * )
  388.      * @Vich\UploadableField(mapping="player", fileNameProperty="thumbnailNameCa", size="thumbnailSizeCa")
  389.      * @var File|null
  390.      */
  391.     private $thumbnailFileCa;
  392.     public function __construct()
  393.     {
  394.         $this->users = new ArrayCollection();
  395.         $this->translations = new ArrayCollection();
  396.         $this->matchTeams = new ArrayCollection();
  397.         $this->teamPlayers = new ArrayCollection();
  398.         $this->drawLines = new ArrayCollection();
  399.         $this->teamPlayerPartner = new ArrayCollection();
  400.         $this->roundResultTeamPlayer = new ArrayCollection();
  401.         $this->roundResultTeamPartner = new ArrayCollection();
  402.     }
  403.     public function __toString()
  404.     {
  405.         return $this->name.' '.$this->surname;
  406.     }
  407.     /**
  408.      * Sets createdAt.
  409.      *
  410.      * @return $this
  411.      */
  412.     public function setCreatedAt(DateTime $createdAt): Player
  413.     {
  414.         $this->createdAt $createdAt;
  415.         return $this;
  416.     }
  417.     /**
  418.      * Returns createdAt.
  419.      *
  420.      * @return DateTime
  421.      */
  422.     public function getCreatedAt(): DateTime
  423.     {
  424.         return $this->createdAt;
  425.     }
  426.     /**
  427.      * Sets updatedAt.
  428.      *
  429.      * @return $this
  430.      */
  431.     public function setUpdatedAt(DateTime $updatedAt): Player
  432.     {
  433.         $this->updatedAt $updatedAt;
  434.         return $this;
  435.     }
  436.     /**
  437.      * Returns updatedAt.
  438.      *
  439.      * @return DateTime
  440.      */
  441.     public function getUpdatedAt(): DateTime
  442.     {
  443.         return $this->updatedAt;
  444.     }
  445.     /**
  446.      * Set or clear the deleted at timestamp.
  447.      *
  448.      * @param DateTime|null $deletedAt
  449.      * @return self
  450.      */
  451.     public function setDeletedAt(DateTime $deletedAt null): Player
  452.     {
  453.         $this->deletedAt $deletedAt;
  454.         return $this;
  455.     }
  456.     /**
  457.      * Get the deleted at timestamp value. Will return null if
  458.      * the entity has not been soft deleted.
  459.      *
  460.      * @return DateTime|null
  461.      */
  462.     public function getDeletedAt(): ?DateTime
  463.     {
  464.         return $this->deletedAt;
  465.     }
  466.     public function getId(): ?int
  467.     {
  468.         return $this->id;
  469.     }
  470.     public function getName(): ?string
  471.     {
  472.         return $this->name;
  473.     }
  474.     public function setName(string $name): self
  475.     {
  476.         $this->name $name;
  477.         return $this;
  478.     }
  479.     public function getSurname(): ?string
  480.     {
  481.         return $this->surname;
  482.     }
  483.     public function setSurname(string $surname): self
  484.     {
  485.         $this->surname $surname;
  486.         return $this;
  487.     }
  488.     public function getRanking(): ?int
  489.     {
  490.         return $this->ranking;
  491.     }
  492.     public function setRanking(?int $ranking): self
  493.     {
  494.         $this->ranking $ranking;
  495.         return $this;
  496.     }
  497.     public function getWeight(): ?string
  498.     {
  499.         return $this->weight;
  500.     }
  501.     public function setWeight(?string $weight): self
  502.     {
  503.         $this->weight $weight;
  504.         return $this;
  505.     }
  506.     public function getHeight(): ?string
  507.     {
  508.         return $this->height;
  509.     }
  510.     public function setHeight(string $height): self
  511.     {
  512.         $this->height $height;
  513.         return $this;
  514.     }
  515.     /**
  516.      * @param File|UploadedFile|null $imageFile
  517.      */
  518.     public function setImageFile(?File $imageFile null): void
  519.     {
  520.         $this->imageFile $imageFile;
  521.         if (null !== $imageFile) {
  522.             $this->updatedAt = new \DateTimeImmutable();
  523.         }
  524.     }
  525.     public function getImageFile(): ?File
  526.     {
  527.         return $this->imageFile;
  528.     }
  529.     public function setImageName(?string $imageName): void
  530.     {
  531.         $this->imageName $imageName;
  532.     }
  533.     public function getImageName(): ?string
  534.     {
  535.         return $this->imageName;
  536.     }
  537.     public function setImageSize(?int $imageSize): void
  538.     {
  539.         $this->imageSize $imageSize;
  540.     }
  541.     public function getImageSize(): ?int
  542.     {
  543.         return $this->imageSize;
  544.     }
  545.     /**
  546.      * @param File|UploadedFile|null $thumbnailFile
  547.      */
  548.     public function setThumbnailFile(?File $thumbnailFile null): void
  549.     {
  550.         $this->thumbnailFile $thumbnailFile;
  551.         if (null !== $thumbnailFile) {
  552.             $this->updatedAt = new \DateTimeImmutable();
  553.         }
  554.     }
  555.     public function getThumbnailFile(): ?File
  556.     {
  557.         return $this->thumbnailFile;
  558.     }
  559.     public function setThumbnailName(?string $thumbnailName): void
  560.     {
  561.         $this->thumbnailName $thumbnailName;
  562.     }
  563.     public function getThumbnailName(): ?string
  564.     {
  565.         return $this->thumbnailName;
  566.     }
  567.     public function setThumbnailSize(?int $thumbnailSize): void
  568.     {
  569.         $this->thumbnailSize $thumbnailSize;
  570.     }
  571.     public function getThumbnailSize(): ?int
  572.     {
  573.         return $this->thumbnailSize;
  574.     }
  575.     public function getCountry(): ?Country
  576.     {
  577.         return $this->country;
  578.     }
  579.     public function setCountry(?Country $country): self
  580.     {
  581.         $this->country $country;
  582.         return $this;
  583.     }
  584.     /**
  585.      * @return Collection|User[]
  586.      */
  587.     public function getUsers(): Collection
  588.     {
  589.         return $this->users;
  590.     }
  591.     public function addUser(User $user): self
  592.     {
  593.         if (!$this->users->contains($user)) {
  594.             $this->users[] = $user;
  595.             $user->addFavoritePlayer($this);
  596.         }
  597.         return $this;
  598.     }
  599.     public function removeUser(User $user): self
  600.     {
  601.         if ($this->users->removeElement($user)) {
  602.             $user->removeFavoritePlayer($this);
  603.         }
  604.         return $this;
  605.     }
  606.     public function getGame(): ?string
  607.     {
  608.         return $this->game;
  609.     }
  610.     public function setGame(?string $game): self
  611.     {
  612.         $this->game $game;
  613.         return $this;
  614.     }
  615.     public function getProfessionalSince(): ?string
  616.     {
  617.         return $this->professionalSince;
  618.     }
  619.     public function setProfessionalSince(?string $professionalSince): self
  620.     {
  621.         $this->professionalSince $professionalSince;
  622.         return $this;
  623.     }
  624.     public function getCoach(): ?string
  625.     {
  626.         return $this->coach;
  627.     }
  628.     public function setCoach(?string $coach): self
  629.     {
  630.         $this->coach $coach;
  631.         return $this;
  632.     }
  633.     public function getBirthPlace(): ?string
  634.     {
  635.         return $this->birthPlace;
  636.     }
  637.     public function setBirthPlace(?string $birthPlace): self
  638.     {
  639.         $this->birthPlace $birthPlace;
  640.         return $this;
  641.     }
  642.     public function getResidence(): ?string
  643.     {
  644.         return $this->residence;
  645.     }
  646.     public function setResidence(?string $residence): self
  647.     {
  648.         $this->residence $residence;
  649.         return $this;
  650.     }
  651.     public function getMaxRanking(): ?int
  652.     {
  653.         return $this->maxRanking;
  654.     }
  655.     public function setMaxRanking(?int $maxRanking): self
  656.     {
  657.         $this->maxRanking $maxRanking;
  658.         return $this;
  659.     }
  660.     /**
  661.      * @return bool
  662.      * @Groups({"player:list", "player:item"})
  663.      */
  664.     public function isFavorite(): bool
  665.     {
  666.         return $this->isFavorite;
  667.     }
  668.     /**
  669.      * @param bool $isFavorite
  670.      */
  671.     public function setIsFavorite(bool $isFavorite): void
  672.     {
  673.         $this->isFavorite $isFavorite;
  674.     }
  675.     public function getAge(): ?int
  676.     {
  677.         return $this->age;
  678.     }
  679.     public function setAge(?int $age): self
  680.     {
  681.         $this->age $age;
  682.         return $this;
  683.     }
  684.     /**
  685.      * @return string
  686.      */
  687.     public function getBirthPlaceEn(): ?string
  688.     {
  689.         return $this->birthPlaceEn;
  690.     }
  691.     /**
  692.      * @param string|null $birthPlaceEn
  693.      */
  694.     public function setBirthPlaceEn(?string $birthPlaceEn): void
  695.     {
  696.         $this->birthPlaceEn $birthPlaceEn;
  697.     }
  698.     /**
  699.      * @return string
  700.      */
  701.     public function getBirthPlaceCa(): ?string
  702.     {
  703.         return $this->birthPlaceCa;
  704.     }
  705.     /**
  706.      * @param string|null $birthPlaceCa
  707.      */
  708.     public function setBirthPlaceCa(?string $birthPlaceCa): void
  709.     {
  710.         $this->birthPlaceCa $birthPlaceCa;
  711.     }
  712.     public function setTranslatableLocale($locale)
  713.     {
  714.         $this->locale $locale;
  715.     }
  716.     public function getTranslations()
  717.     {
  718.         return $this->translations;
  719.     }
  720.     public function addTranslation(PlayerTranslation $t)
  721.     {
  722.         if (!$this->translations->contains($t)) {
  723.             $this->translations[] = $t;
  724.             $t->setObject($this);
  725.         }
  726.     }
  727.     /**
  728.      * @return string
  729.      */
  730.     public function getGameEn(): ?string
  731.     {
  732.         return $this->gameEn;
  733.     }
  734.     /**
  735.      * @param string|null $gameEn
  736.      */
  737.     public function setGameEn(?string $gameEn): void
  738.     {
  739.         $this->gameEn $gameEn;
  740.     }
  741.     /**
  742.      * @return string
  743.      */
  744.     public function getGameCa(): ?string
  745.     {
  746.         return $this->gameCa;
  747.     }
  748.     /**
  749.      * @param string|null $gameCa
  750.      */
  751.     public function setGameCa(?string $gameCa): void
  752.     {
  753.         $this->gameCa $gameCa;
  754.     }
  755.     public function getApiId(): ?string
  756.     {
  757.         return $this->apiId;
  758.     }
  759.     public function setApiId(?string $apiId): self
  760.     {
  761.         $this->apiId $apiId;
  762.         return $this;
  763.     }
  764.     public function getGender(): ?string
  765.     {
  766.         return $this->gender;
  767.     }
  768.     public function setGender(?string $gender): self
  769.     {
  770.         $this->gender $gender;
  771.         return $this;
  772.     }
  773.     public function getPlayHand(): ?string
  774.     {
  775.         return $this->playHand;
  776.     }
  777.     public function setPlayHand(?string $playHand): self
  778.     {
  779.         $this->playHand $playHand;
  780.         return $this;
  781.     }
  782.     public function getBackHand(): ?string
  783.     {
  784.         return $this->backHand;
  785.     }
  786.     public function setBackHand(?string $backHand): self
  787.     {
  788.         $this->backHand $backHand;
  789.         return $this;
  790.     }
  791.     public function getCareerPrizeMoney(): ?int
  792.     {
  793.         return $this->careerPrizeMoney;
  794.     }
  795.     public function setCareerPrizeMoney(?int $careerPrizeMoney): self
  796.     {
  797.         $this->careerPrizeMoney $careerPrizeMoney;
  798.         return $this;
  799.     }
  800.     public function getCareerTitles(): ?int
  801.     {
  802.         return $this->careerTitles;
  803.     }
  804.     public function setCareerTitles(?int $careerTitles): self
  805.     {
  806.         $this->careerTitles $careerTitles;
  807.         return $this;
  808.     }
  809.     public function getCareerWins(): ?int
  810.     {
  811.         return $this->careerWins;
  812.     }
  813.     public function setCareerWins(?int $careerWins): self
  814.     {
  815.         $this->careerWins $careerWins;
  816.         return $this;
  817.     }
  818.     public function getCareerLosses(): ?int
  819.     {
  820.         return $this->careerLosses;
  821.     }
  822.     public function setCareerLosses(?int $careerLosses): self
  823.     {
  824.         $this->careerLosses $careerLosses;
  825.         return $this;
  826.     }
  827.     public function getAlternate(): ?bool
  828.     {
  829.         return $this->alternate;
  830.     }
  831.     public function setAlternate(?bool $alternate): self
  832.     {
  833.         $this->alternate $alternate;
  834.         return $this;
  835.     }
  836.     public function getSeed(): ?string
  837.     {
  838.         return $this->seed;
  839.     }
  840.     public function setSeed(?string $seed): self
  841.     {
  842.         $this->seed $seed;
  843.         return $this;
  844.     }
  845.     public function getEntryCode(): ?string
  846.     {
  847.         return $this->entryCode;
  848.     }
  849.     public function setEntryCode(?string $entry): self
  850.     {
  851.         $this->entryCode $entry;
  852.         return $this;
  853.     }
  854.     /**
  855.      * @return Collection|MatchTeam[]
  856.      */
  857.     public function getMatchTeams(): Collection
  858.     {
  859.         return $this->matchTeams;
  860.     }
  861.     public function addMatchTeam(MatchTeam $matchTeam): self
  862.     {
  863.         if (!$this->matchTeams->contains($matchTeam)) {
  864.             $this->matchTeams[] = $matchTeam;
  865.             $matchTeam->setPlayers($this);
  866.         }
  867.         return $this;
  868.     }
  869.     public function removeMatchTeam(MatchTeam $matchTeam): self
  870.     {
  871.         if ($this->matchTeams->removeElement($matchTeam)) {
  872.             // set the owning side to null (unless already changed)
  873.             if ($matchTeam->getPlayers() === $this) {
  874.                 $matchTeam->setPlayers(null);
  875.             }
  876.         }
  877.         return $this;
  878.     }
  879.     //TODO Revisar que esta dando error con un id en columna desconocida
  880. /*
  881.     public function getTeamPlayer(): ?TeamPlayer
  882.     {
  883.         return $this->teamPlayer;
  884.     }
  885.     public function setTeamPlayer(TeamPlayer $teamPlayer): self
  886.     {
  887.         // set the owning side of the relation if necessary
  888.         if ($teamPlayer->getPlayer() !== $this) {
  889.             $teamPlayer->setPlayer($this);
  890.         }
  891.         $this->teamPlayer = $teamPlayer;
  892.         return $this;
  893.     }*/
  894. /**
  895.  * @return Collection|TeamPlayer[]
  896.  */
  897. public function getTeamPlayers(): Collection
  898. {
  899.     return $this->teamPlayers;
  900. }
  901. public function addTeamPlayer(TeamPlayer $teamPlayer): self
  902. {
  903.     if (!$this->teamPlayers->contains($teamPlayer)) {
  904.         $this->teamPlayers[] = $teamPlayer;
  905.         $teamPlayer->setPlayer($this);
  906.     }
  907.     return $this;
  908. }
  909. public function removeTeamPlayer(TeamPlayer $teamPlayer): self
  910. {
  911.     if ($this->teamPlayers->removeElement($teamPlayer)) {
  912.         // set the owning side to null (unless already changed)
  913.         if ($teamPlayer->getPlayer() === $this) {
  914.             $teamPlayer->setPlayer(null);
  915.         }
  916.     }
  917.     return $this;
  918. }
  919. /**
  920.  * @return Collection<int, DrawLine>
  921.  */
  922. public function getDrawLines(): Collection
  923. {
  924.     return $this->drawLines;
  925. }
  926. public function addDrawLine(DrawLine $drawLine): self
  927. {
  928.     if (!$this->drawLines->contains($drawLine)) {
  929.         $this->drawLines[] = $drawLine;
  930.         $drawLine->addPlayer($this);
  931.     }
  932.     return $this;
  933. }
  934. public function removeDrawLine(DrawLine $drawLine): self
  935. {
  936.     if ($this->drawLines->removeElement($drawLine)) {
  937.         $drawLine->removePlayer($this);
  938.     }
  939.     return $this;
  940. }
  941. /**
  942.  * @return Collection|TeamPlayer[]
  943.  */
  944. public function getTeamPlayerPartner(): Collection
  945. {
  946.     return $this->teamPlayerPartner;
  947. }
  948. public function addTeamPlayerPartner(TeamPlayer $teamPlayerPartner): self
  949. {
  950.     if (!$this->teamPlayerPartner->contains($teamPlayerPartner)) {
  951.         $this->teamPlayerPartner[] = $teamPlayerPartner;
  952.         $teamPlayerPartner->setPartner($this);
  953.     }
  954.     return $this;
  955. }
  956. public function removeTeamPlayerPartner(TeamPlayer $teamPlayerPartner): self
  957. {
  958.     if ($this->teamPlayerPartner->removeElement($teamPlayerPartner)) {
  959.         // set the owning side to null (unless already changed)
  960.         if ($teamPlayerPartner->getPartner() === $this) {
  961.             $teamPlayerPartner->setPartner(null);
  962.         }
  963.     }
  964.     return $this;
  965. }
  966. public function getOrderInTeam(): ?int
  967. {
  968.     return $this->orderInTeam;
  969. }
  970. public function setOrderInTeam(?int $orderInTeam): self
  971. {
  972.     $this->orderInTeam $orderInTeam;
  973.     return $this;
  974. }
  975.     /**
  976.      * @return ArrayCollection
  977.      */
  978.     public function getRoundResultTeamPlayer(): ArrayCollection
  979.     {
  980.         return $this->roundResultTeamPlayer;
  981.     }
  982.     /**
  983.      * @param ArrayCollection $roundResultTeamPlayer
  984.      */
  985.     public function setRoundResultTeamPlayer(ArrayCollection $roundResultTeamPlayer): void
  986.     {
  987.         $this->roundResultTeamPlayer $roundResultTeamPlayer;
  988.     }
  989.     /**
  990.      * @return ArrayCollection
  991.      */
  992.     public function getRoundResultTeamPartner(): ArrayCollection
  993.     {
  994.         return $this->roundResultTeamPartner;
  995.     }
  996.     /**
  997.      * @param ArrayCollection $roundResultTeamPartner
  998.      */
  999.     public function setRoundResultTeamPartner(ArrayCollection $roundResultTeamPartner): void
  1000.     {
  1001.         $this->roundResultTeamPartner $roundResultTeamPartner;
  1002.     }
  1003.     public function getImageNameEn(): ?string
  1004.     {
  1005.         return $this->imageNameEn;
  1006.     }
  1007.     public function setImageNameEn(?string $imageNameEn): self
  1008.     {
  1009.         $this->imageNameEn $imageNameEn;
  1010.         return $this;
  1011.     }
  1012.     public function getImageSizeEn(): ?int
  1013.     {
  1014.         return $this->imageSizeEn;
  1015.     }
  1016.     public function setImageSizeEn(?int $imageSizeEn): self
  1017.     {
  1018.         $this->imageSizeEn $imageSizeEn;
  1019.         return $this;
  1020.     }
  1021.     public function getImageNameCa(): ?string
  1022.     {
  1023.         return $this->imageNameCa;
  1024.     }
  1025.     public function setImageNameCa(?string $imageNameCa): self
  1026.     {
  1027.         $this->imageNameCa $imageNameCa;
  1028.         return $this;
  1029.     }
  1030.     public function getImageSizeCa(): ?int
  1031.     {
  1032.         return $this->imageSizeCa;
  1033.     }
  1034.     public function setImageSizeCa(?int $imageSizeCa): self
  1035.     {
  1036.         $this->imageSizeCa $imageSizeCa;
  1037.         return $this;
  1038.     }
  1039.     public function getThumbnailNameEn(): ?string
  1040.     {
  1041.         return $this->thumbnailNameEn;
  1042.     }
  1043.     public function setThumbnailNameEn(?string $thumbnailNameEn): self
  1044.     {
  1045.         $this->thumbnailNameEn $thumbnailNameEn;
  1046.         return $this;
  1047.     }
  1048.     public function getThumbnailSizeEn(): ?int
  1049.     {
  1050.         return $this->thumbnailSizeEn;
  1051.     }
  1052.     public function setThumbnailSizeEn(?int $thumbnailSizeEn): self
  1053.     {
  1054.         $this->thumbnailSizeEn $thumbnailSizeEn;
  1055.         return $this;
  1056.     }
  1057.     public function getThumbnailNameCa(): ?string
  1058.     {
  1059.         return $this->thumbnailNameCa;
  1060.     }
  1061.     public function setThumbnailNameCa(?string $thumbnailNameCa): self
  1062.     {
  1063.         $this->thumbnailNameCa $thumbnailNameCa;
  1064.         return $this;
  1065.     }
  1066.     public function getThumbnailSizeCa(): ?int
  1067.     {
  1068.         return $this->thumbnailSizeCa;
  1069.     }
  1070.     public function setThumbnailSizeCa(?int $thumbnailSizeCa): self
  1071.     {
  1072.         $this->thumbnailSizeCa $thumbnailSizeCa;
  1073.         return $this;
  1074.     }
  1075.     /**
  1076.      * @param File|UploadedFile|null $imageFileEn
  1077.      */
  1078.     public function setImageFileEn(?File $imageFileEn null): void
  1079.     {
  1080.         $this->imageFileEn $imageFileEn;
  1081.         if (null !== $imageFileEn) {
  1082.             $this->updatedAt = new \DateTimeImmutable();
  1083.         }
  1084.     }
  1085.     public function getImageFileEn(): ?File
  1086.     {
  1087.         return $this->imageFileEn;
  1088.     }
  1089.     /**
  1090.      * @param File|UploadedFile|null $imageFileCa
  1091.      */
  1092.     public function setImageFileCa(?File $imageFileCa null): void
  1093.     {
  1094.         $this->imageFileCa $imageFileCa;
  1095.         if (null !== $imageFileCa) {
  1096.             $this->updatedAt = new \DateTimeImmutable();
  1097.         }
  1098.     }
  1099.     public function getImageFileCa(): ?File
  1100.     {
  1101.         return $this->imageFileCa;
  1102.     }
  1103.     /**
  1104.      * @param File|UploadedFile|null $thumbnailFileEn
  1105.      */
  1106.     public function setThumbnailFileEn(?File $thumbnailFileEn null): void
  1107.     {
  1108.         $this->thumbnailFileEn $thumbnailFileEn;
  1109.         if (null !== $thumbnailFileEn) {
  1110.             $this->updatedAt = new \DateTimeImmutable();
  1111.         }
  1112.     }
  1113.     public function getThumbnailFileEn(): ?File
  1114.     {
  1115.         return $this->thumbnailFileEn;
  1116.     }
  1117.     /**
  1118.      * @param File|UploadedFile|null $thumbnailFileCa
  1119.      */
  1120.     public function setThumbnailFileCa(?File $thumbnailFileCa null): void
  1121.     {
  1122.         $this->thumbnailFileCa $thumbnailFileCa;
  1123.         if (null !== $thumbnailFileCa) {
  1124.             $this->updatedAt = new \DateTimeImmutable();
  1125.         }
  1126.     }
  1127.     public function getThumbnailFileCa(): ?File
  1128.     {
  1129.         return $this->thumbnailFileCa;
  1130.     }
  1131. }