class Migration(migrations.Migration): dependencies = [ ('cars', '0001_initial'), ] operations = [ migrations.CreateModel( name='Type', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('name', models.CharField(max_length=200, unique=True)), ('created_at', models.DateTimeField(auto_now_add=True)), ('slug', autoslug.fields.AutoSlugField( editable=False, populate_from='name', slugify=cars.models.custom_slugify, unique_with=('created_at__month', ))), ], ), ]
class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ migrations.CreateModel( name='Cars', fields=[ ('cars_id', models.AutoField(primary_key=True, serialize=False)), ('brand', models.CharField(max_length=50)), ('model', models.CharField(max_length=50)), ('year', models.IntegerField(validators=[ django.core.validators.MinValueValidator(1984), cars.models.max_value_current_year ], verbose_name='year')), ('color', models.CharField(max_length=50)), ('price', models.FloatField()), ('condition', models.CharField(choices=[('N', 'New'), ('T', 'Tokunbo'), ('NU', 'Nigerian Use')], max_length=2)), ('fuel_type', models.CharField(choices=[('P', 'Petrol'), ('D', 'Diesel'), ('E', 'Electric')], max_length=1, verbose_name='fuel type')), ('image', models.ImageField(blank=True, null=True, upload_to=cars.models.upload_location)), ('date_uploaded', models.DateTimeField(auto_now_add=True, verbose_name='date uploaded')), ('date_updated', models.DateTimeField(auto_now=True, verbose_name='date updated')), ('slug', models.SlugField(blank=True, unique=True)), ('seller', models.ForeignKey(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='Car', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('condition', models.CharField(max_length=45)), ('year', models.IntegerField()), ('trim', models.CharField(max_length=45)), ('car_model', models.CharField(max_length=45)), ('body_style', models.CharField(max_length=45)), ('transmission', models.IntegerField()), ('fuel', models.CharField(max_length=45)), ('feature', models.TextField()), ('cylinder', models.IntegerField()), ('color_internal', models.CharField(max_length=45)), ('color_external', models.CharField(max_length=45)), ('price', models.CharField(max_length=45)), ('kilometer', models.IntegerField()), ('car_brand', models.CharField(max_length=45)), ('describe', models.TextField()), ], ), migrations.CreateModel( name='Car_brand', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('name', models.CharField(max_length=45)), ], ), migrations.CreateModel( name='Car_image', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('image', models.ImageField(upload_to=cars.models.car_directory_path)), ('car', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cars.Car')), ], ), migrations.CreateModel( name='Car_model', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('name', models.CharField(max_length=45)), ('brand', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cars.Car_brand')), ], ), migrations.CreateModel( name='City', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('name', models.CharField(max_length=45)), ], ), migrations.CreateModel( name='Country', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('name', models.CharField(max_length=45)), ('currency_unit', models.CharField(max_length=45)), ], ), migrations.CreateModel( name='Seller', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('full_name', models.CharField(max_length=45)), ('phone_number', models.CharField(max_length=45)), ('location_pin', models.CharField(max_length=45)), ('address', models.CharField(max_length=255)), ('type', models.BooleanField(default=True)), ('create_time', models.DateTimeField(auto_now_add=True)), ('update_time', models.DateTimeField(auto_now=True)), ('city', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cars.City')), ('country', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='cars.Country')), ('user', models.OneToOneField( on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), ], ), migrations.AddField( model_name='city', name='country', field=models.ForeignKey( on_delete=django.db.models.deletion.CASCADE, to='cars.Country'), ), migrations.AddField( model_name='car', name='city', field=models.ForeignKey( on_delete=django.db.models.deletion.CASCADE, to='cars.City'), ), migrations.AddField( model_name='car', name='country', field=models.ForeignKey( on_delete=django.db.models.deletion.CASCADE, to='cars.Country'), ), migrations.AddField( model_name='car', name='user', field=models.ForeignKey( on_delete=django.db.models.deletion.CASCADE, to='cars.Seller'), ), ]
class Migration(migrations.Migration): dependencies = [ ('core', '0002_auto_20201215_0344'), ('cars', '0005_brand_featured'), ] operations = [ migrations.AddField( model_name='car', name='purpose', field=models.CharField(blank=True, choices=[('sale', 'Sale'), ('hire', 'Hire')], max_length=4, null=True), ), migrations.CreateModel( name='SparePart', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('title', models.CharField(max_length=200, null=True)), ('price', models.FloatField()), ('image', models.ImageField(upload_to='spareparts/')), ('description', models.TextField(null=True)), ('views', models.PositiveIntegerField(default=0)), ('featured', models.PositiveIntegerField(default=0)), ('created_at', models.DateTimeField(auto_now_add=True)), ('slug', autoslug.fields.AutoSlugField( editable=False, populate_from='title', slugify=cars.models.custom_slugify, unique_with=('created_at__month', ))), ('region', models.CharField(blank=True, choices=[('ashanti', 'Ashanti'), ('ahafo', 'Ahafo'), ('brong-ahafo', 'Brong Ahafo'), ('bono-east', 'Bono East '), ('central', 'Central'), ('eastern', 'Eastern'), ('greater-accra', 'Greater Accra'), ('northern', 'Northern'), ('savannah', 'Savannah'), ('north-east', 'North East'), ('upper-east', 'Upper East'), ('upper-west', 'Upper West'), ('volta', 'Volta'), ('oti', 'Oti Region'), ('werstern', 'Western'), ('werstern-north', 'Western North') ], max_length=20, null=True)), ('state', models.CharField(choices=[('new', 'New'), ('used', 'Used')], max_length=4, null=True)), ('locality', models.ForeignKey( blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='sparelocality', to='core.Locality')), ], ), ]
class Migration(migrations.Migration): initial = True dependencies = [] operations = [ migrations.CreateModel( name='Brand', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('name', models.CharField(max_length=200, unique=True)), ('image', models.ImageField(blank=True, null=True, upload_to='brands/')), ('created_at', models.DateTimeField(auto_now_add=True)), ('slug', autoslug.fields.AutoSlugField( editable=False, populate_from='name', slugify=cars.models.custom_slugify, unique_with=('created_at__month', ))), ], ), migrations.CreateModel( name='Car', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('title', models.CharField(max_length=200, null=True)), ('price', models.FloatField()), ('image', models.ImageField(upload_to='cars/')), ('description', models.TextField(null=True)), ('views', models.PositiveIntegerField(default=0)), ('featured', models.PositiveIntegerField(default=0)), ('created_at', models.DateTimeField(auto_now_add=True)), ('slug', autoslug.fields.AutoSlugField( editable=False, populate_from='title', slugify=cars.models.custom_slugify, unique_with=('created_at__month', ))), ('region', models.CharField(blank=True, choices=[('ashanti', 'Ashanti'), ('ahafo', 'Ahafo'), ('brong-ahafo', 'Brong Ahafo'), ('bono-east', 'Bono East '), ('central', 'Central'), ('eastern', 'Eastern'), ('greater-accra', 'Greater Accra'), ('northern', 'Northern'), ('savannah', 'Savannah'), ('north-east', 'North East'), ('upper-east', 'Upper East'), ('upper-west', 'Upper West'), ('volta', 'Volta'), ('oti', 'Oti Region'), ('werstern', 'Western'), ('werstern-north', 'Western North') ], max_length=20, null=True)), ('int_color', colorfield.fields.ColorField(blank=True, default='#FFFFFF', max_length=18, null=True)), ('ext_color', colorfield.fields.ColorField(blank=True, default='#FFFFFF', max_length=18, null=True)), ('mileage', models.CharField(blank=True, max_length=200, null=True)), ('fuel_type', models.CharField(blank=True, choices=[('petrol', 'Petrol'), ('diesel', 'Diesel'), ('gas', 'Gas')], max_length=6, null=True)), ('gearbox', models.CharField(blank=True, choices=[('automatic', 'Automatic'), ('manual', 'Manual')], max_length=10, null=True)), ('drive_type', models.CharField(blank=True, choices=[('left', 'Left'), ('right', 'Right')], max_length=5, null=True)), ('car_state', models.CharField(choices=[('new', 'New'), ('used', 'Used')], max_length=4, null=True)), ('engine', models.CharField(blank=True, max_length=200, null=True)), ('air_con', models.CharField(blank=True, choices=[('no', 'No'), ('yes', 'Yes')], max_length=3, null=True)), ('year', models.IntegerField(validators=[ django.core.validators.MinValueValidator(1984), cars.models.max_value_current_year ], verbose_name='year')), ('brand', models.ForeignKey( blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='carbrands', to='cars.Brand')), ], ), migrations.CreateModel( name='CarImage', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('images', models.ImageField(blank=True, null=True, upload_to='cars')), ('car', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='carimages', to='cars.Car')), ], ), ]
class Migration(migrations.Migration): initial = True dependencies = [] operations = [ migrations.CreateModel( name='Car', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('make', models.CharField(max_length=128)), ('year', models.CharField(choices=[('2008', '2008'), ('2009', '2009'), ('2010', '2010'), ('2011', '2011'), ('2012', '2012'), ('2013', '2013'), ('2014', '2014'), ('2015', '2015'), ('2016', '2016'), ('2017', '2017'), ('2018', '2018'), ('2019', '2019')], default='2018', max_length=32)), ('model', models.CharField(max_length=128)), ('type', models.CharField(max_length=256)), ('color', models.CharField(default='White', max_length=64)), ('rego', models.CharField(max_length=128, unique=True)), ('engine_no', models.CharField(max_length=256, unique=True)), ('vin', models.CharField(max_length=256, unique=True)), ('transmission', models.CharField(max_length=256)), ('options', models.CharField(blank=True, max_length=256)), ('maintenance_status', models.CharField(max_length=256)), ('lease_start_date', models.DateField(default='2018-02-14')), ('lease_term', models.PositiveIntegerField(default=36)), ('rental', models.DecimalField(decimal_places=2, default=1500, max_digits=10)), ('distance_restrict', models.DecimalField(decimal_places=2, default=210000, max_digits=10)), ('start_odometer', models.DecimalField(decimal_places=2, default=0, max_digits=10)), ('excess_kmcharge', models.DecimalField(decimal_places=2, default=0.12, max_digits=10)), ('default_interest', models.DecimalField(decimal_places=2, default=0.18, max_digits=10)), ('lessor', models.CharField(choices=[('S', 'Street Fleet'), ('P', 'PRS Owned')], default='S', max_length=8)), ('status', models.CharField(choices=[('A', 'Active'), ('S', 'In Service'), ('I', 'In Idle')], default='A', max_length=8)), ('rego_exp', models.DateField(default='2019-06-30')), ('insurer', models.CharField(default='AAMI', max_length=128)), ('policy_num', models.CharField(default='P12345678', max_length=128)), ('insurance_exp', models.DateField(default='2019-06-30')), ('fuel_efficiency', models.DecimalField(decimal_places=2, default=10, max_digits=10)), ('contract', models.FileField( upload_to=cars.models.Car.get_contract_upload_path)), ('file_upload_date', models.DateField(default='2018-06-30')), ], options={ 'ordering': ['rego'], }, ), migrations.CreateModel( name='Driver', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('name', models.CharField(max_length=128)), ('mobile', models.CharField(max_length=32, unique=True)), ('license', models.CharField(default=1234567890, max_length=128)), ('email', models.CharField(default=None, max_length=256, null=True)), ('dept', models.CharField(choices=[('BG', 'Brown Goods'), ('WG', 'White Goods'), ('BL', 'Billing Team'), ('AC', 'Accountants'), ('CC', 'Call Center'), ('IT', 'IT Department'), ('MG', 'Management'), ('SP', 'Spare Parts'), ('HHP', 'Mobile Phones'), ('BDM', 'Business Development')], default='BG', max_length=8)), ], options={ 'ordering': ['name'], }, ), migrations.CreateModel( name='DrivingRecord', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('start_date', models.DateTimeField()), ('end_date', models.DateTimeField(blank=True, null=True)), ('created_at', models.DateTimeField(auto_now=True)), ('car', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='working_records', to='cars.Car')), ('driver', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='driving_records', to='cars.Driver')), ], options={ 'ordering': ['car', '-start_date'], }, ), migrations.AlterUniqueTogether( name='driver', unique_together={('name', 'mobile', 'dept')}, ), ]