17 lines
364 B
Python
17 lines
364 B
Python
from django.contrib.auth.models import AbstractUser
|
|
from django.db import models
|
|
|
|
|
|
class CustomUser(AbstractUser):
|
|
pass
|
|
|
|
|
|
class Licence(models.Model):
|
|
licence_number = models.CharField(max_length=100)
|
|
date_obtained = models.DateField()
|
|
# entitlements
|
|
|
|
|
|
class Driver(CustomUser):
|
|
licence = models.ForeignKey('Licence', on_delete=models.CASCADE)
|