17 lines
549 B
Python
17 lines
549 B
Python
|
from django.db import models
|
||
|
|
||
|
from konova.models import UuidModel
|
||
|
|
||
|
|
||
|
class Team(UuidModel):
|
||
|
""" Groups users in self managed teams. Can be used for multi-sharing of data
|
||
|
|
||
|
"""
|
||
|
name = models.CharField(max_length=500, null=True, blank=True)
|
||
|
description = models.TextField(null=True, blank=True)
|
||
|
users = models.ManyToManyField("user.User", blank=True, related_name="teams")
|
||
|
admin = models.ForeignKey("user.User", blank=True, null=True, related_name="+", on_delete=models.SET_NULL)
|
||
|
|
||
|
def __str__(self):
|
||
|
return self.name
|