#101 Team settings

* adds first implementation for team managing
This commit is contained in:
2022-02-17 13:13:32 +01:00
parent 7a760332fa
commit e8fae7a6f4
9 changed files with 285 additions and 32 deletions

16
user/models/team.py Normal file
View File

@@ -0,0 +1,16 @@
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