generated from ocadotechnology/codeforlife-template-backend
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
45 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
""" | ||
© Ocado Group | ||
Created on 08/07/2024 at 10:48:44(+01:00). | ||
""" | ||
|
||
from django.db import models | ||
from .contributor import Contributor | ||
|
||
class AgreementSignature(models.Model): | ||
""" Signature of a contributor signing the agreement """ | ||
id = models.AutoField(primary_key=True) | ||
contributor = models.ForeignKey(Contributor, on_delete=models.CASCADE) | ||
agreement_id = models.CharField(max_length=40) | ||
signed_at = models.DateTimeField() | ||
|
||
def __str__(self): | ||
return self.id | ||
|
||
class Meta: | ||
constraints = [ | ||
models.UniqueConstraint(fields=["contributor", "agreement_id"], name='unique_contributor_agreement') | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters