0001_initial.py 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. # Generated by Django 4.1.3 on 2023-05-15 10:49
  2. import django.contrib.auth.models
  3. import django.contrib.auth.validators
  4. from django.db import migrations, models
  5. import django.utils.timezone
  6. class Migration(migrations.Migration):
  7. initial = True
  8. dependencies = [
  9. ('auth', '0012_alter_user_first_name_max_length'),
  10. ]
  11. operations = [
  12. migrations.CreateModel(
  13. name='SharixUser',
  14. fields=[
  15. ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
  16. ('password', models.CharField(max_length=128, verbose_name='password')),
  17. ('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')),
  18. ('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')),
  19. ('username', models.CharField(error_messages={'unique': 'A user with that username already exists.'}, help_text='Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.', max_length=150, unique=True, validators=[django.contrib.auth.validators.UnicodeUsernameValidator()], verbose_name='username')),
  20. ('first_name', models.CharField(blank=True, max_length=150, verbose_name='first name')),
  21. ('last_name', models.CharField(blank=True, max_length=150, verbose_name='last name')),
  22. ('email', models.EmailField(blank=True, max_length=254, verbose_name='email address')),
  23. ('is_staff', models.BooleanField(default=False, help_text='Designates whether the user can log into this admin site.', verbose_name='staff status')),
  24. ('is_active', models.BooleanField(default=True, help_text='Designates whether this user should be treated as active. Unselect this instead of deleting accounts.', verbose_name='active')),
  25. ('date_joined', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date joined')),
  26. ('phone_number', models.CharField(help_text='А здесь можно добавить описание поля', max_length=60, unique=True, verbose_name='Номер телефона')),
  27. ('groups', models.ManyToManyField(blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_name='user_set', related_query_name='user', to='auth.group', verbose_name='groups')),
  28. ('user_permissions', models.ManyToManyField(blank=True, help_text='Specific permissions for this user.', related_name='user_set', related_query_name='user', to='auth.permission', verbose_name='user permissions')),
  29. ],
  30. options={
  31. 'db_table': 'auth_user',
  32. },
  33. managers=[
  34. ('objects', django.contrib.auth.models.UserManager()),
  35. ],
  36. ),
  37. ]