 + */
 +class PlayerRepository extends EntityRepository
 +{
++    public function getCaptainForTeam(Team $team)
++    {
++        return $this->build()
++            ->andWhere($this->getAlias().'.team = :team')
++            ->setParameter('team', $team)
++            ->setMaxResults(1)
++            ->getQuery()
++            ->getOneOrNullResult()
++        ;
++    }
 +}
 diff --git a/src/App/Entity/Team.php b/src/App/Entity/Team.php
 new file mode 100644
-index 0000000..2d32dec
+index 0000000..effa912
 --- /dev/null
 +++ b/src/App/Entity/Team.php
 @@ -0,0 +1,138 @@

+    {
+        $this->team = $team;
+    }
+}
diff --git a/src/App/Entity/PlayerRepository.php b/src/App/Entity/PlayerRepository.php
new file mode 100644
index 0000000..18db403
--- /dev/null
+++ b/src/App/Entity/PlayerRepository.php
@@ -0,0 +1,15 @@
+<?php
+
+namespace App\Entity;
+
+use Doctrine\ORM\EntityRepository;
+
+/**
+ * PlayerRepository

diff --git a/src/App/Entity/Player.php b/src/App/Entity/Player.php
new file mode 100644
index 0000000..e7af20a
--- /dev/null
+++ b/src/App/Entity/Player.php
@@ -0,0 +1,152 @@
+<?php
+
+namespace App\Entity;
