# Generated by Django 2.2.1 on 2019-05-09 21:40

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


class Migration(migrations.Migration):

    dependencies = [
        ('core', '0007_auto_20190507_2235'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('trip', '0003_auto_20190507_2235'),
    ]

    operations = [
        migrations.AlterField(
            model_name='tripuser',
            name='trip',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='trip_user', to='trip.Trip'),
        ),
        migrations.AlterField(
            model_name='tripuser',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='trip_user', to=settings.AUTH_USER_MODEL),
        ),
        migrations.CreateModel(
            name='Expense',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('title', models.CharField(max_length=255, verbose_name='title')),
                ('amount', models.DecimalField(decimal_places=2, max_digits=20, validators=[django.core.validators.MinValueValidator(0.01)], verbose_name='amount')),
                ('created_by', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='expenses', to=settings.AUTH_USER_MODEL)),
                ('currency', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='expenses', to='core.Currency')),
                ('trip', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='expenses', to='trip.Trip')),
            ],
            options={
                'verbose_name': 'expense',
                'verbose_name_plural': 'expenses',
            },
        ),
    ]
