# Generated by Django 3.1.6 on 2021-02-18 12:03

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


class Migration(migrations.Migration):

    dependencies = [
        ('Money_app', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=50)),
                ('slug', models.SlugField(unique=True, verbose_name='url')),
            ],
            options={
                'verbose_name': 'Категория',
                'verbose_name_plural': 'Категории',
                'ordering': ['title'],
            },
        ),
        migrations.CreateModel(
            name='Expenses',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('money', models.FloatField(verbose_name='How much am I spending?')),
                ('description', models.TextField(blank=True)),
                ('created_at', models.DateTimeField(auto_now_add=True, verbose_name='Added')),
                ('category', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='expenses', to='Money_app.category')),
            ],
            options={
                'verbose_name': 'Expense',
                'verbose_name_plural': 'Expenses',
                'ordering': ['-created_at'],
            },
        ),
        migrations.CreateModel(
            name='Month',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=50)),
                ('slug', models.SlugField(unique=True, verbose_name='url')),
                ('created_at', models.DateTimeField(auto_now_add=True, verbose_name='Added')),
            ],
            options={
                'verbose_name': 'Month',
                'ordering': ['-created_at'],
            },
        ),
        migrations.CreateModel(
            name='TranshMvf',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('money', models.FloatField(verbose_name='How much I got?')),
                ('description', models.TextField(blank=True)),
                ('created_at', models.DateTimeField(auto_now_add=True, verbose_name='Added')),
                ('category', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='Source_type', to='Money_app.category')),
                ('month', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='Money_app.month')),
            ],
            options={
                'verbose_name': 'Income',
                'ordering': ['-created_at'],
            },
        ),
        migrations.CreateModel(
            name='Year',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.IntegerField()),
                ('slug', models.SlugField(unique=True, verbose_name='url')),
                ('created_at', models.DateTimeField(auto_now_add=True, verbose_name='Added')),
                ('month', models.ManyToManyField(related_name='month', to='Money_app.Month', verbose_name='month')),
            ],
            options={
                'verbose_name': 'Year',
                'ordering': ['-created_at'],
            },
        ),
        migrations.DeleteModel(
            name='Student',
        ),
        migrations.AddField(
            model_name='month',
            name='year',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='year', to='Money_app.year', verbose_name='Year'),
        ),
        migrations.AddField(
            model_name='expenses',
            name='month',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='Money_app.month'),
        ),
    ]
