# Generated by Django 3.0.8 on 2020-11-26 15:10

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


class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Main_food',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=50)),
                ('brand', models.CharField(blank=True, max_length=50, null=True)),
                ('category', models.CharField(choices=[('drink', 'drink'), ('food', 'food')], max_length=40, null=True)),
                ('weight', models.PositiveIntegerField(blank=True, default=100, validators=[django.core.validators.MaxValueValidator(1000)])),
                ('calories', models.PositiveIntegerField(null=True, validators=[django.core.validators.MaxValueValidator(5000)])),
                ('total_fat', models.DecimalField(decimal_places=2, max_digits=6, null=True)),
                ('carbs', models.DecimalField(decimal_places=2, max_digits=6, null=True)),
                ('fiber', models.DecimalField(blank=True, decimal_places=2, max_digits=6, null=True)),
                ('protein', models.DecimalField(decimal_places=2, max_digits=6, null=True)),
                ('salt', models.DecimalField(blank=True, decimal_places=2, max_digits=6, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Profile_user',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('first_name', models.CharField(blank=True, max_length=50, null=True)),
                ('last_name', models.CharField(blank=True, max_length=50, null=True)),
                ('weight', models.DecimalField(blank=True, decimal_places=2, max_digits=6, null=True)),
                ('height', models.DecimalField(blank=True, decimal_places=2, max_digits=6, null=True)),
                ('bmi', models.DecimalField(blank=True, decimal_places=3, max_digits=6, null=True)),
                ('age', models.PositiveIntegerField(blank=True, null=True)),
                ('weight_goal', models.PositiveIntegerField(blank=True, default=0, null=True, validators=[django.core.validators.MaxValueValidator(200)])),
                ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='profile', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Daily_food',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('category', models.CharField(choices=[('drink', 'drink'), ('food', 'food')], max_length=40)),
                ('weight', models.PositiveIntegerField(validators=[django.core.validators.MaxValueValidator(10000)])),
                ('date_consumed', models.DateTimeField(default=django.utils.timezone.now)),
                ('food', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='health.Main_food')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='consumed_food', to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
