title: Database relationship between a match and its players
body: <p>I'm trying to design a database that would save matches and players in a 3v3 game.</p>
  <p>So far my models look like this :</p>
  <pre class="lang-py prettyprint-override"><code>class Player(models.Model):
      user = models.OneToOneField(User, on_delete=models.CASCADE, null=True)
      player_tag = models.CharField(max_length=9, unique=True)
      player_name = models.CharField(max_length=50)
      trophy_count = models.IntegerField(default=0)
      club = models.ForeignKey('Club', on_delete=models.SET_NULL, null=True)
      total_club_war_trophy_count = models.IntegerField(default=0)
  
  
  class Club(models.Model):
      club_name = models.CharField(max_length=50)
      club_tag = models.CharField(max_length=9, unique=True)
  
  
  class Match(models.Model):
      # Matches are 3v3
      player_1 = models.ForeignKey(Player, on_delete=models.CASCADE)
      player_2 = models.ForeignKey(Player, on_delete=models.CASCADE)
      player_3 = models.ForeignKey(Player, on_delete=models.CASCADE)
      player_4 = models.ForeignKey(Player, on_delete=models.CASCADE)
      player_5 = models.ForeignKey(Player, on_delete=models.CASCADE)
      player_6 = models.ForeignKey(Player, on_delete=models.CASCADE)
      # Brawlball, Gem grab, Knockout ...
      mode = models.CharField(max_length=20)
      # Power match or normal match
      battle_type = models.CharField(max_length=20)
      trophies_won = models.IntegerField(default=0)
      date = models.DateTimeField(auto_now_add=True)
  </code></pre>
  <p>However the repetition of &quot;<code>player_&lt;int&gt;</code>&quot; is itching me, I don't think this is the proper way to do it. What if the number of player changes at some point, or how to I find if a player participated in a match ? I think it's a clunky approach at best.</p>
  <p>How could I approach this better ? I was thinking about maybe a list of players, but I don't know how to characterize this kind of relationship.</p>