2020-04-13 18:03:01 +00:00
|
|
|
from polymorphic.models import PolymorphicModel
|
|
|
|
from phonenumber_field.modelfields import PhoneNumberField
|
|
|
|
|
2020-04-15 20:56:04 +00:00
|
|
|
from django.db.models import OneToOneField, CASCADE, CharField, ImageField
|
2020-04-13 18:03:01 +00:00
|
|
|
from django.contrib.auth import get_user_model
|
|
|
|
|
|
|
|
class Profile(PolymorphicModel):
|
|
|
|
user = OneToOneField(get_user_model(), CASCADE)
|
|
|
|
mobile = PhoneNumberField(blank=True)
|
|
|
|
|
|
|
|
class AdminProfile(Profile):
|
2020-04-15 20:56:04 +00:00
|
|
|
role = CharField(max_length=64)
|
|
|
|
image = ImageField(null=True)
|