Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Doctor(models.Model):
- TYPE_CALL = [
- ('Общие практики (Терапевт/Педеатор)','Общие практики (Терапевт/Педеатор)'),
- ('COVID', 'COVID'),
- ('Хроники', 'Хроники'),
- ]
- CHOICES_OPTION = (
- ('Есть', 'Есть'),
- ('Нет', 'Нет'),
- )
- user = models.OneToOneField(settings.AUTH_USER_MODEL, on_delete=models.CASCADE, verbose_name='Пользователь',default=None)
- fio = models.CharField('Ф.И.О', max_length=255, blank=False, db_index=True, null=True)
- polyclinic = models.ForeignKey('Polyclinic', on_delete=models.SET_NULL, blank=True, null=True)
- zone = models.ManyToManyField('Zone', blank=False)
- position = models.CharField('Должность', max_length = 150, blank=True)
- specialty = models.CharField('Специальность', max_length = 150, blank=True)
- town = models.ForeignKey(Town, verbose_name="Город",null=True, blank=False, on_delete=models.SET_NULL)
- phone_regex = RegexValidator(regex=r'^\+?1?\d{9,15}$')
- phone = models.CharField('Контактный номер телефона', validators=[phone_regex], max_length=17, blank=True,db_index=True)
- type_call = models.CharField('Тип врача', max_length=50, choices=TYPE_CALL, null=True, blank=True)
- objects = DoctorManager()
- drivers_license = models.CharField('Водительское удостоверение', choices=CHOICES_OPTION, max_length=20, null=True, blank=True)
- password = models.CharField('Пароль', max_length=8, blank=False, db_index=True, null=True)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement