|
| 1 | +# Generated by Django 2.1.1 on 2018-09-24 18:17 |
| 2 | + |
| 3 | +import datetime |
| 4 | +from django.db import migrations, models |
| 5 | +import django.db.models.deletion |
| 6 | + |
| 7 | + |
| 8 | +class Migration(migrations.Migration): |
| 9 | + |
| 10 | + initial = True |
| 11 | + |
| 12 | + dependencies = [ |
| 13 | + ('realtors', '0001_initial'), |
| 14 | + ] |
| 15 | + |
| 16 | + operations = [ |
| 17 | + migrations.CreateModel( |
| 18 | + name='Listing', |
| 19 | + fields=[ |
| 20 | + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), |
| 21 | + ('title', models.CharField(max_length=200)), |
| 22 | + ('address', models.CharField(max_length=200)), |
| 23 | + ('city', models.CharField(max_length=100)), |
| 24 | + ('state', models.CharField(max_length=100)), |
| 25 | + ('zipcode', models.CharField(max_length=20)), |
| 26 | + ('description', models.TextField(blank=True)), |
| 27 | + ('price', models.IntegerField()), |
| 28 | + ('bedrooms', models.IntegerField()), |
| 29 | + ('bathrooms', models.DecimalField(decimal_places=1, max_digits=2)), |
| 30 | + ('garage', models.IntegerField(default=0)), |
| 31 | + ('sqft', models.IntegerField()), |
| 32 | + ('lot_size', models.DecimalField(decimal_places=1, max_digits=5)), |
| 33 | + ('photo_main', models.ImageField(upload_to='photos/%Y/%m/%d/')), |
| 34 | + ('photo_1', models.ImageField(blank=True, upload_to='photos/%Y/%m/%d/')), |
| 35 | + ('photo_2', models.ImageField(blank=True, upload_to='photos/%Y/%m/%d/')), |
| 36 | + ('photo_3', models.ImageField(blank=True, upload_to='photos/%Y/%m/%d/')), |
| 37 | + ('photo_4', models.ImageField(blank=True, upload_to='photos/%Y/%m/%d/')), |
| 38 | + ('photo_5', models.ImageField(blank=True, upload_to='photos/%Y/%m/%d/')), |
| 39 | + ('photo_6', models.ImageField(blank=True, upload_to='photos/%Y/%m/%d/')), |
| 40 | + ('is_published', models.BooleanField(default=True)), |
| 41 | + ('list_date', models.DateTimeField(blank=True, default=datetime.datetime.now)), |
| 42 | + ('realtor', models.ForeignKey(on_delete=django.db.models.deletion.DO_NOTHING, to='realtors.Realtor')), |
| 43 | + ], |
| 44 | + ), |
| 45 | + ] |
0 commit comments