|
| 1 | +# Generated by Django 3.1.5 on 2021-05-06 16:01 |
| 2 | + |
| 3 | +import accounts.models |
| 4 | +from decimal import Decimal |
| 5 | +from django.conf import settings |
| 6 | +from django.db import migrations, models |
| 7 | +import django.db.models.deletion |
| 8 | +import uuid |
| 9 | + |
| 10 | + |
| 11 | +class Migration(migrations.Migration): |
| 12 | + |
| 13 | + initial = True |
| 14 | + |
| 15 | + dependencies = [ |
| 16 | + ('auth', '0012_alter_user_first_name_max_length'), |
| 17 | + ] |
| 18 | + |
| 19 | + operations = [ |
| 20 | + migrations.CreateModel( |
| 21 | + name='User', |
| 22 | + fields=[ |
| 23 | + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), |
| 24 | + ('password', models.CharField(max_length=128, verbose_name='password')), |
| 25 | + ('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')), |
| 26 | + ('email', models.EmailField(max_length=255, unique=True)), |
| 27 | + ('full_name', models.TextField()), |
| 28 | + ('phone_number', models.CharField(max_length=50, unique=True)), |
| 29 | + ('is_active', models.BooleanField(default=True)), |
| 30 | + ('is_first_login', models.BooleanField(default=True)), |
| 31 | + ('is_customer', models.BooleanField(default=False)), |
| 32 | + ('is_artist', models.BooleanField(default=False)), |
| 33 | + ('is_kalafex_admin', models.BooleanField(default=False)), |
| 34 | + ('is_staff', models.BooleanField(default=False)), |
| 35 | + ('is_superuser', models.BooleanField(default=False)), |
| 36 | + ('date_of_birth', models.DateField()), |
| 37 | + ('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')), |
| 38 | + ('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')), |
| 39 | + ], |
| 40 | + options={ |
| 41 | + 'abstract': False, |
| 42 | + }, |
| 43 | + ), |
| 44 | + migrations.CreateModel( |
| 45 | + name='Artist', |
| 46 | + fields=[ |
| 47 | + ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, primary_key=True, serialize=False, to='accounts.user')), |
| 48 | + ('bio', models.TextField(blank=True, null=True)), |
| 49 | + ('custom_url', models.CharField(max_length=255, unique=True)), |
| 50 | + ('aadhar_card_no', models.TextField(blank=True, null=True)), |
| 51 | + ('pan_card_no', models.TextField(blank=True, null=True)), |
| 52 | + ('gst_no', models.TextField(blank=True, null=True)), |
| 53 | + ('profile_picture', models.ImageField(default='uploads/profile_pictures/default.png', null=True, upload_to=accounts.models.image_directory_path, verbose_name='profile picture')), |
| 54 | + ('cashout_requested', models.BooleanField(default=False)), |
| 55 | + ('balance', models.DecimalField(decimal_places=2, default=Decimal('0.00'), max_digits=14)), |
| 56 | + ('ifsc_code', models.TextField(blank=True, null=True)), |
| 57 | + ('account_number', models.TextField(blank=True, null=True)), |
| 58 | + ('bank_branch', models.TextField(blank=True, null=True)), |
| 59 | + ('beneficiary_name', models.TextField(blank=True, null=True)), |
| 60 | + ('upi_id', models.TextField(blank=True, null=True)), |
| 61 | + ], |
| 62 | + options={ |
| 63 | + 'ordering': ['user__full_name'], |
| 64 | + }, |
| 65 | + ), |
| 66 | + migrations.CreateModel( |
| 67 | + name='Customer', |
| 68 | + fields=[ |
| 69 | + ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, primary_key=True, serialize=False, to='accounts.user')), |
| 70 | + ('profile_picture', models.ImageField(default='uploads/profile_pictures/default.png', null=True, upload_to=accounts.models.image_directory_path, verbose_name='profile picture')), |
| 71 | + ], |
| 72 | + ), |
| 73 | + migrations.CreateModel( |
| 74 | + name='KalafexAdmin', |
| 75 | + fields=[ |
| 76 | + ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, primary_key=True, serialize=False, to='accounts.user')), |
| 77 | + ], |
| 78 | + ), |
| 79 | + migrations.CreateModel( |
| 80 | + name='Address', |
| 81 | + fields=[ |
| 82 | + ('a_id', models.UUIDField(default=uuid.uuid4, primary_key=True, serialize=False)), |
| 83 | + ('street', models.TextField()), |
| 84 | + ('city', models.CharField(max_length=255)), |
| 85 | + ('state', models.CharField(max_length=255)), |
| 86 | + ('pin_code', models.CharField(max_length=100)), |
| 87 | + ('address_type', models.CharField(choices=[('Billing', 'Billing'), ('Shipping', 'Shipping'), ('Pickup', 'Pickup')], max_length=8)), |
| 88 | + ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), |
| 89 | + ], |
| 90 | + options={ |
| 91 | + 'verbose_name_plural': 'addresses', |
| 92 | + }, |
| 93 | + ), |
| 94 | + ] |
0 commit comments