title: Django Rest Framework, help describing a model containing ManyToMany relationship with users and extending user information
body: <p>I have a model that basically works like an event. An event is create by a user (ForeignKey). Then other users can join the event and bring guests (Not users but just &quot;anon&quot; users). Meaning that when users join an event they can state how many outside guests they want to bring. I am having trouble figuring out how to extend the model to include the number of guests each user would like to bring.
  A user can join multiple events and bring a different amount of guests to each event. Another thing is that when a user creates an event, they supply a list of diet options. These options are the available diets, thus when another User joins the event they have to select which diet they are.
  The potential guests attached to the users joining are simply a number and thus it is not needed to choose the diet of all the guests a user wants to add. Now finally, my current model looks like this,</p>
  <pre><code>class VeganParticipants(models.Model):
      participant = models.ForeignKey(MyUser, related_name='vegan_participant', on_delete=models.CASCADE)
      guests = models.PositiveIntegerField(default=0)
  
  class VegetarianParticipants(models.Model):
      participant = models.ForeignKey(MyUser, related_name='vegetarian_participant', on_delete=models.CASCADE)
      guests = models.PositiveIntegerField(default=0)
  
  class MeatParticipants(models.Model):
      participant = models.ForeignKey(MyUser, related_name='meat_participant', on_delete=models.CASCADE)
      guests = models.PositiveIntegerField(default=0)
  
  
  class Madklub(models.Model):
      owner = models.ForeignKey(MyUser, related_name=&quot;owner&quot;, null=False, blank=False, on_delete=models.CASCADE)
      dish = models.CharField(max_length=100, null=True, blank=True)
      date = models.DateField(null=False, blank=False, unique=True)
      active = models.BooleanField(default=True)
      vegan_participants = models.ManyToManyField(VeganParticipants, related_name=&quot;vegan_participants&quot;, blank=True)
      vegetarian_participants = models.ManyToManyField(VegetarianParticipants, related_name=&quot;vegetarian_participants&quot;, blank=True)
      meat_participants = models.ManyToManyField(MeatParticipants, related_name=&quot;meat_participants&quot;, blank=True)
      diet = ArrayField(
          models.CharField(choices=DIET_OPTIONS, max_length=10, default=&quot;vegetarian&quot;)
      )
      
      class Meta:
          ordering = ('date',)
  </code></pre>
  <p>As you see I have actually created three additional models one for each of the possible diet options. Thus when a User joins a an event (Madklub) then they are also created in a their respective diet model including the amount of guests. To me it seems that this way is not really nice.</p>
  <p>The creation of the events works as expected, a User creates an event and is assigned to the participants + how ever many guests they choose. Now comes my problem, a user can successfully join an event and also indicate the amount of guests they wish to bring. However they can join multiple times, since I do not know how to check if they already exists in the participants.
  And I feel this is very hard to check because of the way I have made the model. The same goes for leaving an event, I do not know how to only delete the current user from an event, since I can not check what they initially joined as (diet option). Side note, if a user leaves the event their guests should also be removed, hence why I tried to create the additional models.</p>
  <p>If anyone has any idea on how to rewrite my model and serializer, I would be very, very grateful. The Madklub model should be created by a User and be listed as the owner, the owner should also be included in the participants. Users should be able to join an event (once) and select how many guests (non-users) to bring. The user joining should also be able to select their desired diet.</p>
  <p>Sorry for the long wall of text. Any help is greatly appreciated!!!</p>