# Generated by Django 3.2.16 on 2023-02-20 20:44

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


class Migration(migrations.Migration):

    dependencies = [
        ('utilz', '0005_sachetmodel'),
        ('sachet_analysis', '0002_auto_20230215_1634'),
    ]

    operations = [
        migrations.RemoveField(
            model_name='sachetanalysismodel',
            name='product',
        ),
        migrations.RemoveField(
            model_name='sachetanalysismodel',
            name='product_size',
        ),
        migrations.AddField(
            model_name='sachetanalysismodel',
            name='product_id',
            field=models.OneToOneField(default='1', on_delete=django.db.models.deletion.PROTECT, related_name='product', to='utilz.productsmodel'),
            preserve_default=False,
        ),
        migrations.CreateModel(
            name='SachetAnalysisFilesModel',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('file', models.FileField(blank=True, null=True, upload_to='files_folder', validators=[django.core.validators.FileExtensionValidator(['png', 'jpg', 'jpeg', 'pdf', 'doc', 'docx', 'cdr'])])),
                ('created_by', models.CharField(max_length=24)),
                ('datetime_created', models.DateTimeField(auto_now_add=True)),
                ('machine_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='files', to='sachet_analysis.sachetanalysismodel')),
            ],
            options={
                'verbose_name_plural': 'LINE ANALYSIS UPLOADED FILES',
                'ordering': ('machine_id__date', 'machine_id__shift', 'machine_id__machine'),
            },
        ),
    ]
