You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
680 B
Python
21 lines
680 B
Python
from django.contrib.auth.models import AbstractUser
|
|
from django.db import models
|
|
|
|
class DepotUser(AbstractUser):
|
|
USER_TYPES = (
|
|
('management', 'Management'),
|
|
('barrier', 'Barrier Staff'),
|
|
('client', 'Client'),
|
|
)
|
|
user_type = models.CharField(max_length=20, choices=USER_TYPES, default='client')
|
|
|
|
# Add any other fields you want
|
|
phone_number = models.CharField(max_length=15, blank=True, null=True)
|
|
email = models.EmailField(unique=True, blank=False, null=False)
|
|
line = models.ForeignKey(
|
|
'common.LinesModel',
|
|
on_delete=models.CASCADE,
|
|
related_name='user_lines',
|
|
blank=True,
|
|
null=True
|
|
) |