# Generated by Django 2.2.4 on 2019-10-03 00:56

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Grain',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=255)),
            ],
            options={
                'verbose_name_plural': 'Grains',
                'ordering': ['name'],
            },
        ),
        migrations.CreateModel(
            name='TypeGrain',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('name_type', models.CharField(max_length=255)),
                ('status', models.BooleanField(default=True)),
                ('grain', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='grain_type', to='grain.Grain')),
            ],
            options={
                'verbose_name_plural': 'Types Grains',
                'ordering': ['name_type'],
            },
        ),
        migrations.CreateModel(
            name='SampleGrain',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('name_sample', models.CharField(max_length=255)),
                ('image', models.ImageField(upload_to='sample_<django.db.models.fields.UUIDField>/')),
                ('grain', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='grain_sample', to='grain.Grain')),
            ],
            options={
                'verbose_name': 'Sample Grain',
                'verbose_name_plural': 'Samples Grains',
                'ordering': ['name_sample'],
            },
        ),
        migrations.CreateModel(
            name='SampleDetailGrain',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('name_seed', models.CharField(max_length=25)),
                ('width_grain', models.FloatField(default=0)),
                ('heigth_grain', models.FloatField(default=0)),
                ('point_percent', models.FloatField(default=0)),
                ('image_result', models.ImageField(blank=True, upload_to='sample_result/')),
                ('type_grain_detail', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='detail_type', to='grain.TypeGrain')),
            ],
            options={
                'verbose_name': 'Sample Detail Grain',
                'verbose_name_plural': 'Samples Details Grains',
                'ordering': ['name_seed'],
            },
        ),
        migrations.CreateModel(
            name='AnalysisGrain',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('sample', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='analysiss_sample', to='grain.SampleGrain')),
                ('type_grain', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='analysis_type', to='grain.TypeGrain')),
            ],
            options={
                'verbose_name_plural': 'Analysis Grains',
                'ordering': ['sample__nsame_sample'],
            },
        ),
    ]
