Coverage for backend/authentication/user/AccessTable.py: 100%

7 statements  

« prev     ^ index     » next       coverage.py v7.10.7, created at 2025-11-06 23:27 +0000

1from django.db import models 

2from authentication.user.models import User 

3 

4class AccessTable(models.Model): 

5 """Join table linking users to flowsheets they are allowed to access.""" 

6 user = models.ForeignKey(User, on_delete=models.CASCADE, related_name="access_list") 

7 flowsheet = models.ForeignKey("core_auxiliary.Flowsheet", on_delete=models.CASCADE, related_name="access_list") 

8 

9 class Meta: 

10 unique_together = ("user", "flowsheet")