Update the model to remove uuid, simplify

This commit is contained in:
Nico Schottelius 2018-11-17 09:42:34 +01:00
parent 41c49800ee
commit a58886979f
1 changed files with 14 additions and 5 deletions

View File

@ -1,10 +1,19 @@
from django.db import models
import uuid
# Create your models here.
class OTPSeed(models.Model):
appuuid = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
appname = models.CharField(max_length=128)
username = models.CharField(max_length=128)
name = models.CharField(max_length=128)
realm = models.CharField(max_length=128)
seed = models.CharField(max_length=128)
trusted = models.BooleanField(default=False)
class Meta:
unique_together = (('name', 'realm'),)
# V1
# class OTPSeed(models.Model):
# appuuid = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
# appname = models.CharField(max_length=128)
# username = models.CharField(max_length=128)
# seed = models.CharField(max_length=128)
# trusted = models.BooleanField(default=False)