chore: Synchronisation IMAP

This commit is contained in:
N3WT DE COMPET
2025-05-27 19:59:53 +02:00
parent c5248d9fd3
commit 39d6a8e909
14 changed files with 187 additions and 47 deletions

View File

@ -2,6 +2,7 @@ from django.contrib.auth.models import AbstractUser
from django.db import models
from django.utils.translation import gettext_lazy as _
from django.core.validators import EmailValidator
from django_mailbox.models import Mailbox
class Profile(AbstractUser):
email = models.EmailField(max_length=255, unique=True, default="", validators=[EmailValidator()])
@ -11,9 +12,13 @@ class Profile(AbstractUser):
roleIndexLoginDefault = models.IntegerField(default=0)
code = models.CharField(max_length=200, default="", blank=True)
datePeremption = models.CharField(max_length=200, default="", blank=True)
def __str__(self):
return self.email
mailbox = models.OneToOneField(
Mailbox,
on_delete=models.SET_NULL,
null=True,
blank=True,
related_name='profile'
)
class ProfileRole(models.Model):
class RoleType(models.IntegerChoices):