# core/models.py

from django.db import models
from django.contrib.auth.models import User

class Invitation(models.Model):
    user = models.ForeignKey(User, on_delete=models.CASCADE, related_name='invitations')
    meeting = models.ForeignKey('core.Meeting', on_delete=models.CASCADE, related_name='invitations')
    is_admin = models.BooleanField(default=False)
    is_sms_sent = models.BooleanField(default=False)

    def __str__(self):
        return f"Invitation of {self.user.username} to {self.meeting.name}"
