@@ -5,6 +5,7 @@ Contact: michel.peltriaux@sgdnord.rlp.de
|
||||
Created on: 15.11.21
|
||||
|
||||
"""
|
||||
from .user_action import *
|
||||
from .user import *
|
||||
from .notification import *
|
||||
from .user_action import UserActionLogEntry, UserAction
|
||||
from .user import User
|
||||
from .notification import UserNotification, UserNotificationEnum
|
||||
from .team import Team
|
||||
|
||||
16
user/models/team.py
Normal file
16
user/models/team.py
Normal 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
|
||||
Reference in New Issue
Block a user