# Generated by Django 2.2.7 on 2019-11-12 10:03

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
import versatileimagefield.fields


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('groups', '0040_auto_20190914_0724'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Offer',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('created_at', models.DateTimeField(default=django.utils.timezone.now)),
                ('name', models.CharField(max_length=80)),
                ('description', models.TextField()),
                ('status', models.CharField(choices=[('active', 'active'), ('accepted', 'accepted'), ('archived', 'archived')], default='active', max_length=100)),
                ('status_changed_at', models.DateTimeField(default=django.utils.timezone.now)),
                ('group', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='groups.Group')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='OfferImage',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('created_at', models.DateTimeField(default=django.utils.timezone.now)),
                ('image', versatileimagefield.fields.VersatileImageField(upload_to='offer_images', verbose_name='Offer Image')),
                ('offer', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='images', to='offers.Offer')),
                ('position', models.IntegerField(default=0)),
            ],
            options={
                'abstract': False,
                'ordering': ['position'],
            },
        ),
    ]
