# Generated by Django 3.2.6 on 2021-10-09 19:50

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Adverts',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=32, verbose_name='Naslov')),
                ('description', models.TextField(verbose_name='Opis oglasa')),
                ('load_date', models.DateField(verbose_name='Datum postavljanja oglasa')),
                ('expire_date', models.DateField(verbose_name='Datum isticanja oglasa')),
                ('date_archived', models.DateTimeField(blank=True, null=True)),
                ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'permissions': [('advert_can_create', 'Can create advert'), ('advert_edit', 'Can edit advert'), ('advert_can_archive', 'Can archive advert'), ('advert_can_delete', 'Can delete advert')],
            },
        ),
        migrations.CreateModel(
            name='AdvertDeleteRequest',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('Date', models.DateTimeField(auto_now_add=True)),
                ('Advert', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='adverts.adverts')),
                ('User', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
