Skip to content
Snippets Groups Projects
Commit 743de7b4 authored by Tore.Brede's avatar Tore.Brede
Browse files

Adding more verification types

parent 109f0085
No related branches found
No related tags found
1 merge request!17Updates to datamodel
Pipeline #88880 failed
# Generated by Django 3.2.5 on 2021-08-04 10:40 # Generated by Django 3.2.5 on 2021-08-04 11:07
import datetime import datetime
import dirtyfields.dirtyfields import dirtyfields.dirtyfields
...@@ -158,7 +158,7 @@ class Migration(migrations.Migration): ...@@ -158,7 +158,7 @@ class Migration(migrations.Migration):
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('created', models.DateTimeField(auto_now_add=True)), ('created', models.DateTimeField(auto_now_add=True)),
('updated', models.DateTimeField(auto_now=True)), ('updated', models.DateTimeField(auto_now=True)),
('type', models.CharField(choices=[('PASSPORT_NUMBER', 'Passport Number'), ('FEIDE_ID', 'Feide Id')], max_length=15)), ('type', models.CharField(choices=[('ID_PORTEN', 'Id Porten'), ('FEIDE_ID', 'Feide Id'), ('PASSPORT', 'Passport'), ('DRIVERS_LICENSE', 'Drivers License'), ('NATIONAL_ID_CARD', 'National Id Card'), ('OTHER', 'Other')], max_length=16)),
('source', models.CharField(max_length=256)), ('source', models.CharField(max_length=256)),
('value', models.CharField(max_length=256)), ('value', models.CharField(max_length=256)),
('verified', models.CharField(blank=True, choices=[('AUTOMATIC', 'Automatic'), ('MANUAL', 'Manual')], max_length=9)), ('verified', models.CharField(blank=True, choices=[('AUTOMATIC', 'Automatic'), ('MANUAL', 'Manual')], max_length=9)),
......
...@@ -131,10 +131,14 @@ class Notification(BaseModel): ...@@ -131,10 +131,14 @@ class Notification(BaseModel):
class PersonIdentity(BaseModel): class PersonIdentity(BaseModel):
# TODO: Add more types
class IdentityType(models.TextChoices): class IdentityType(models.TextChoices):
PASSPORT_NUMBER = "PASSPORT_NUMBER" ID_PORTEN = "ID_PORTEN"
FEIDE_ID = "FEIDE_ID" FEIDE_ID = "FEIDE_ID"
PASSPORT = "PASSPORT"
DRIVERS_LICENSE = "DRIVERS_LICENSE"
NATIONAL_ID_CARD = "NATIONAL_ID_CARD"
# Sponsor writes what is used in the value column
OTHER = "OTHER"
class Verified(models.TextChoices): class Verified(models.TextChoices):
AUTOMATIC = "AUTOMATIC" AUTOMATIC = "AUTOMATIC"
...@@ -143,7 +147,7 @@ class PersonIdentity(BaseModel): ...@@ -143,7 +147,7 @@ class PersonIdentity(BaseModel):
person = models.ForeignKey( person = models.ForeignKey(
"Person", on_delete=models.PROTECT, related_name="person" "Person", on_delete=models.PROTECT, related_name="person"
) )
type = models.CharField(max_length=15, choices=IdentityType.choices) type = models.CharField(max_length=16, choices=IdentityType.choices)
source = models.CharField(max_length=256) source = models.CharField(max_length=256)
value = models.CharField(max_length=256) value = models.CharField(max_length=256)
verified = models.CharField(max_length=9, choices=Verified.choices, blank=True) verified = models.CharField(max_length=9, choices=Verified.choices, blank=True)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment