mirror of
https://github.com/Dadechin/Dashboard-XRoom.git
synced 2025-07-03 08:44:34 +00:00
13 lines
549 B
Python
13 lines
549 B
Python
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
|