from django.db import models
from django.contrib.auth.models import User
from core.models.Subscription import Subscription
class Team(models.Model):
    name = models.CharField(max_length=100)
    description = models.TextField(blank=True)
    max_persons = models.PositiveIntegerField()
    admin = models.ForeignKey(User, on_delete=models.CASCADE, related_name='admin_teams')
    subscription = models.ForeignKey(Subscription, on_delete=models.CASCADE, related_name='teams', null=True, blank=True)

    def __str__(self):
        return self.name
