.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
from django.db import models
|
||||
from django.utils import timezone
|
||||
import uuid
|
||||
|
||||
|
||||
class RotaSchedule(models.Model):
|
||||
@@ -130,6 +131,14 @@ class Worker(models.Model):
|
||||
|
||||
rotas = models.ManyToManyField(RotaSchedule, through="Assignment", related_name="workers")
|
||||
|
||||
# Token used to allow workers (without Django accounts) to access
|
||||
# self-service links (request leave, view their calendar, etc.). This
|
||||
# is a UUID4 and should be treated as a secret. Regenerate to revoke.
|
||||
# During migration we add this field as nullable and non-unique first,
|
||||
# then populate unique values in a data migration and finally make it
|
||||
# non-null and unique. See migrations/ for the migration sequence.
|
||||
request_token = models.UUIDField(default=uuid.uuid4, editable=False, null=True, unique=False)
|
||||
|
||||
def __str__(self):
|
||||
return self.name
|
||||
|
||||
|
||||
Reference in New Issue
Block a user