class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ migrations.CreateModel( name='CustomerData', fields=[ ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('code', models.CharField(default=customer.models.key_generator, editable=False, max_length=6, unique=True)), ('vehicle_number', models.CharField(blank=True, max_length=100, null=True)), ('entry_time', models.DateTimeField(blank=True, null=True)), ('exit_time', models.DateTimeField(blank=True, null=True)), ('amount', models.IntegerField(default=0)), ('customer', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), ], ), ]
class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ migrations.CreateModel( name='Customer', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('date_of_birth', models.DateField()), ('image', models.ImageField( blank=True, upload_to=customer.models.upload_image_path)), ('address', models.CharField(max_length=250)), ('is_active', models.BooleanField(default=False)), ('timestamp', models.DateTimeField(auto_now_add=True)), ('last_update', models.DateTimeField(auto_now=True)), ('person', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='customer_user', to=settings.AUTH_USER_MODEL)), ], ), ]
class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ migrations.CreateModel( name='Customer_Order', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('customer_name', models.CharField(max_length=55)), ('customer_number', models.BigIntegerField()), ('image', models.ImageField(blank=True, null=True, upload_to=customer.models.upload_location)), ('product', models.CharField(max_length=20)), ('place', models.CharField(max_length=20)), ('date_published', models.DateTimeField(auto_now_add=True, verbose_name='date published')), ('date_updated', models.DateTimeField(auto_now=True, verbose_name='date updated')), ('slug', models.SlugField(blank=True, unique=True)), ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), ], ), ]
class Migration(migrations.Migration): initial = True dependencies = [ ('userprofile', '0002_auto_20170126_1520'), ] operations = [ migrations.CreateModel( name='Contract', fields=[ ('contract_id', models.CharField(default=customer.models.generate_contract_id, max_length=20, primary_key=True, serialize=False)), ('total_contract_amount', models.IntegerField(default=0)), ('tax_percentage', models.IntegerField(default=0)), ('net_contract_amount', models.IntegerField(default=0)), ('date', models.DateField(auto_now_add=True)), ('contract_type', models.CharField(choices=[('amc', 'AMC'), ('s', 'Single'), ('st', 'Short Term')], max_length=5)), ('description', models.TextField()), ('is_tax_applicable', models.BooleanField(default=False)), ('active', models.BooleanField(default=True)), ('created_time', models.DateTimeField(auto_now_add=True)), ('updated_time', models.DateTimeField(auto_now=True)), ('added_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='Contract_added_by', to='userprofile.UserProfile')), ('contract_employee', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='userprofile.Employee')), ], ), migrations.CreateModel( name='Customer', fields=[ ('customer_id', models.CharField(default=customer.models.generate_customer_id, max_length=20, primary_key=True, serialize=False)), ('customer_type', models.CharField(choices=[('res', 'Residential'), ('cmcl', 'Commercial')], db_index=True, max_length=5)), ('company_name', models.TextField()), ('contact_person', models.CharField(blank=True, max_length=100, null=True)), ('salutation', models.CharField(choices=[('mr', 'Mr'), ('mrs', 'Mrs'), ('ms', 'Ms')], max_length=4)), ('email', models.CharField(blank=True, max_length=100, null=True)), ('present_address', models.TextField(blank=True)), ('permanent_address', models.TextField(blank=True)), ('city', models.TextField()), ('mobile', models.CharField(blank=True, max_length=15, null=True)), ('landline', models.CharField(blank=True, max_length=15, null=True)), ('company_type', models.CharField(blank=True, choices=[('hotel', 'Hotels & Resorts'), ('it', 'IT Companies'), ('co', 'Corporate Offices'), ('fpu', 'Food Processing Units'), ('go', 'Government Offices')], max_length=5, null=True)), ('active', models.BooleanField(default=True)), ('created_time', models.DateTimeField(auto_now_add=True)), ('updated_time', models.DateTimeField(auto_now=True)), ('added_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='Customer_added_by', to='userprofile.UserProfile')), ('edited_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='Customer_edited_by', to='userprofile.UserProfile')), ], ), migrations.CreateModel( name='Enquiry', fields=[ ('enquiry_id', models.CharField(default=customer.models.generate_enquiry_id, max_length=20, primary_key=True, serialize=False)), ('created_date', models.DateField(auto_now_add=True)), ('status', models.CharField(choices=[('f', 'Followup'), ('c', 'Confirmed'), ('n', 'Not Interested'), ('i', 'Inspection')], max_length=5)), ('comments', models.TextField()), ('amount', models.IntegerField(blank=True, null=True)), ('active', models.BooleanField(default=True)), ('created_time', models.DateTimeField(auto_now_add=True)), ('updated_time', models.DateTimeField(auto_now=True)), ('added_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='Enquiry_added_by', to='userprofile.UserProfile')), ('customer', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='customer.Customer')), ('edited_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='Enquiry_edited_by', to='userprofile.UserProfile')), ('reminder_to', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='userprofile.Employee')), ], ), migrations.CreateModel( name='EnquiryLog', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('status', models.CharField(choices=[('f', 'Followup'), ('c', 'Confirmed'), ('n', 'Not Interested'), ('i', 'Inspection')], max_length=5)), ('date', models.DateField(auto_now_add=True)), ('active', models.BooleanField(default=True)), ('created_time', models.DateTimeField(auto_now_add=True)), ('updated_time', models.DateTimeField(auto_now=True)), ('added_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='EnquiryLog_added_by', to='userprofile.UserProfile')), ('edited_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='EnquiryLog_edited_by', to='userprofile.UserProfile')), ('enquiry', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='customer.Enquiry')), ], ), migrations.CreateModel( name='EnquiryService', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('service', models.CharField(max_length=30)), ], ), migrations.AddField( model_name='enquiry', name='service_required', field=models.ManyToManyField(to='customer.EnquiryService'), ), migrations.AddField( model_name='contract', name='customer', field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='customer.Customer'), ), migrations.AddField( model_name='contract', name='edited_by', field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='Contract_edited_by', to='userprofile.UserProfile'), ), migrations.AddField( model_name='contract', name='enquiry', field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='customer.Enquiry'), ), ]
class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('product', '0011_auto_20190813_0644'), ('location', '0001_initial'), ] operations = [ migrations.CreateModel( name='Customer', fields=[ ('full_name', models.CharField(max_length=255, primary_key=True, serialize=False)), ('phone_number', models.CharField(blank=True, max_length=50)), ('email', models.CharField(blank=True, max_length=255)), ('address', models.TextField()), ('description', models.TextField(blank=True)), ('created_at', models.DateTimeField(auto_now_add=True)), ('updated_at', models.DateTimeField(auto_now_add=True)), ('is_status', models.BooleanField(default=True)), ('province', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='location.Location')), ], options={ 'ordering': ['created_at'], }, ), migrations.CreateModel( name='SaleInvoice', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('invoice_number', models.CharField( blank=True, default=customer.models.increment_invoice_number, max_length=500, null=True, validators=[ django.core.validators.RegexValidator( code='Number is invalide', message='Produce number must be Alphanumeric', regex='^[a-zA-Z0-9]*$') ])), ('description', models.TextField(blank=True)), ('created_at', models.DateTimeField(auto_now_add=True)), ('updated_at', models.DateTimeField(auto_now_add=True)), ('is_status', models.BooleanField(default=True)), ('customer', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='sale_invoice_customer', to='customer.Customer')), ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='sale_invoice_user', to=settings.AUTH_USER_MODEL)), ], options={ 'ordering': ['-created_at', '-updated_at'], }, ), migrations.CreateModel( name='SaleInvoiceItem', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('unit', models.IntegerField(default=0)), ('unit_price', models.FloatField(blank=True, default=0.0)), ('description', models.TextField(blank=True)), ('created_at', models.DateTimeField(auto_now_add=True)), ('updated_at', models.DateTimeField(auto_now_add=True)), ('is_status', models.BooleanField(default=True)), ('invoice', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='sale_invoice', to='customer.SaleInvoice')), ('product', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='sale_invoice_item_product', to='product.Product')), ], options={ 'ordering': ['-created_at', '-updated_at'], }, ), migrations.CreateModel( name='SaleInvoiceItemHistory', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('unit', models.IntegerField(default=0)), ('unit_price', models.FloatField(default=0.0)), ('description', models.TextField(blank=True)), ('action', models.CharField(blank=True, max_length=20, null=True)), ('created_at', models.DateTimeField(auto_now_add=True)), ('updated_at', models.DateTimeField(auto_now_add=True)), ('is_status', models.BooleanField(default=True)), ('invoice', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='sale_invoice_history', to='customer.SaleInvoice')), ('product', models.ForeignKey( on_delete=django.db.models.deletion.CASCADE, related_name='sale_invoice_item_product_history', to='product.Product')), ], options={ 'ordering': ['-created_at', '-updated_at'], }, ), ]
class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ migrations.CreateModel( name='Address', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('name', models.CharField(max_length=50)), ('fax', models.IntegerField(blank=True, null=True)), ('postal_code', models.IntegerField(blank=True, null=True)), ('address', models.TextField(blank=True, max_length=600, null=True)), ], ), migrations.CreateModel( name='Customer', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('code', models.IntegerField( blank=True, default=customer.models.default_customer_code, unique=True)), ('code_temp', models.IntegerField(blank=True, null=True)), ('name', models.CharField(max_length=100)), ('pub_date', models.DateTimeField(default=django.utils.timezone.now)), ('date2', django_jalali.db.models.jDateField( default=django.utils.timezone.now)), ('phone', models.CharField(blank=True, max_length=100, null=True)), ('fax', models.CharField(blank=True, max_length=15, null=True)), ('email', models.EmailField(blank=True, max_length=254, null=True)), ('website', models.URLField(blank=True, max_length=250, null=True)), ('postal_code', models.CharField(blank=True, max_length=15, null=True)), ('addr', models.TextField(blank=True, max_length=600, null=True)), ('agent', models.BooleanField(default=False)), ('imported', models.BooleanField(default=False)), ('owner', models.ForeignKey( on_delete=django.db.models.deletion.DO_NOTHING, related_name='owner', to=settings.AUTH_USER_MODEL)), ], options={ 'permissions': (('read_customer', 'Can read a customer details'), ('index_customer', 'Can see list of customers'), ('index_requests', 'customer can see list of requests')), }, ), migrations.CreateModel( name='Phone', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('phone_number', models.CharField(max_length=15)), ('add', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='customer.Address')), ], ), migrations.CreateModel( name='Type', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('name', models.CharField(max_length=20)), ], ), migrations.AddField( model_name='customer', name='type', field=models.ForeignKey( on_delete=django.db.models.deletion.DO_NOTHING, to='customer.Type'), ), migrations.AddField( model_name='customer', name='user', field=models.OneToOneField( blank=True, null=True, on_delete=django.db.models.deletion.DO_NOTHING, to=settings.AUTH_USER_MODEL), ), migrations.AddField( model_name='address', name='customer', field=models.ForeignKey( on_delete=django.db.models.deletion.CASCADE, to='customer.Customer'), ), ]