# Generated by Django 3.2.16 on 2023-02-08 13:22

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('contenttypes', '0002_remove_content_type_name'),
    ]

    operations = [
        migrations.CreateModel(
            name='BgaTime',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100, verbose_name='Nom de la machine')),
                ('date', models.DateField(auto_now_add=True, verbose_name='date')),
                ('start_time', models.TimeField(auto_now_add=True, verbose_name='heure de START')),
                ('end_time', models.TimeField(null=True, verbose_name='heure de FIN')),
                ('duration', models.IntegerField(null=True, verbose_name='durée en secondes')),
            ],
            options={
                'verbose_name': 'BGA Time',
                'ordering': ['id'],
            },
        ),
        migrations.CreateModel(
            name='ConfigFile',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100, unique=True, verbose_name='nom du logiciel')),
                ('path', models.CharField(max_length=500, unique=True, verbose_name='chemin du fichier')),
                ('filename', models.CharField(max_length=100, verbose_name='nom du fichier')),
                ('content', models.TextField(verbose_name='contenu du fichier')),
            ],
        ),
        migrations.CreateModel(
            name='EtudeProject',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=200, verbose_name='projet')),
                ('progress', models.PositiveIntegerField(validators=[django.core.validators.MaxValueValidator(100), django.core.validators.MinValueValidator(0)], verbose_name='avancée en %')),
            ],
        ),
        migrations.CreateModel(
            name='Suptech',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date', models.DateField(verbose_name='DATE')),
                ('user', models.CharField(max_length=50, verbose_name='QUI')),
                ('xelon', models.CharField(blank=True, max_length=10, verbose_name='XELON')),
                ('product', models.CharField(blank=True, max_length=200, verbose_name='PRODUCT')),
                ('item', models.CharField(max_length=200, verbose_name='ITEM')),
                ('time', models.CharField(max_length=10, verbose_name='TIME')),
                ('info', models.TextField(max_length=2000, verbose_name='INFO')),
                ('rmq', models.TextField(blank=True, max_length=2000, verbose_name='RMQ')),
                ('action', models.TextField(blank=True, max_length=2000, verbose_name='ACTION/RETOUR')),
                ('status', models.TextField(choices=[('En Attente', 'En Attente'), ('En Cours', 'En Cours'), ('Cloturée', 'Cloturée'), ('Annulée', 'Annulée')], default='En Attente', max_length=50, verbose_name='STATUT')),
                ('deadline', models.DateField(blank=True, null=True, verbose_name='DATE LIMITE')),
                ('is_48h', models.BooleanField(default=True, verbose_name='Traitement 48h')),
                ('to', models.TextField(default='test1@test.com; test2@test.com', max_length=5000, verbose_name='TO')),
                ('cc', models.TextField(default='test1@test.com; test2@test.com', max_length=5000, verbose_name='CC')),
                ('created_at', models.DateTimeField(editable=False, null=True, verbose_name='ajouté le')),
                ('modified_at', models.DateTimeField(null=True, verbose_name='modifié le')),
            ],
            options={
                'verbose_name': 'SupTech',
                'ordering': ['pk'],
            },
        ),
        migrations.CreateModel(
            name='SuptechCategory',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=200, verbose_name='nom')),
                ('manager', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='suptechs_manager', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='ThermalChamberMeasure',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('datetime', models.DateTimeField(auto_now_add=True, verbose_name='heure de mesure')),
                ('value', models.IntegerField(verbose_name='valeur mesuré')),
                ('temp', models.CharField(max_length=20, verbose_name='température')),
            ],
            options={
                'verbose_name': 'Thermal Chamber Measure',
                'ordering': ['-datetime'],
            },
        ),
        migrations.CreateModel(
            name='ThermalChamber',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('operating_mode', models.CharField(choices=[('FROID', 'FROID'), ('CHAUD', 'CHAUD')], max_length=20, verbose_name='mode de fonctionnement')),
                ('xelon_number', models.CharField(blank=True, max_length=10, verbose_name='N° Xelon')),
                ('start_time', models.DateTimeField(blank=True, null=True, verbose_name='heure de début')),
                ('stop_time', models.DateTimeField(blank=True, null=True, verbose_name='heure de fin')),
                ('active', models.BooleanField(default=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('created_by', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='TagXelon',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('xelon', models.CharField(max_length=10)),
                ('comments', models.CharField(blank=True, max_length=400, verbose_name='commentaires')),
                ('calibre', models.BooleanField(choices=[(False, 'Logiciel CAL'), (True, 'Diagbox')], default=False, verbose_name='calibration')),
                ('telecode', models.BooleanField(choices=[(False, 'Non'), (True, 'Oui')], default=False, verbose_name='télécodage')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('created_by', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'Tag Xelon Multi',
                'ordering': ['-created_at'],
            },
        ),
        migrations.CreateModel(
            name='SuptechMessage',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('content', models.TextField()),
                ('added_at', models.DateTimeField(auto_now=True, verbose_name='ajouté le')),
                ('object_id', models.PositiveIntegerField()),
                ('added_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='message_added', to=settings.AUTH_USER_MODEL)),
                ('content_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='contenttypes.contenttype')),
            ],
            options={
                'verbose_name': 'SupTech Message',
                'ordering': ['-added_at'],
            },
        ),
        migrations.CreateModel(
            name='SuptechItem',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100, unique=True, verbose_name='Nom')),
                ('extra', models.BooleanField(default=False)),
                ('is_48h', models.BooleanField(default=True, verbose_name='Traitement 48h')),
                ('is_active', models.BooleanField(default=True, verbose_name='Actif')),
                ('mailing_list', models.TextField(default='test1@test.com; test2@test.com', max_length=5000, verbose_name="Liste d'email")),
                ('cc_mailing_list', models.TextField(default='test1@test.com; test2@test.com', max_length=5000, verbose_name="liste d'email CC")),
                ('category', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='tools.suptechcategory')),
                ('cc_users', models.ManyToManyField(blank=True, related_name='cc_sup_items', to=settings.AUTH_USER_MODEL)),
                ('to_users', models.ManyToManyField(blank=True, related_name='to_sup_items', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name': 'SupTech Item',
                'ordering': ['name'],
            },
        ),
        migrations.CreateModel(
            name='SuptechFile',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('file', models.FileField(upload_to='suptech/%Y/%m')),
                ('suptech', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='tools.suptech')),
            ],
            options={
                'verbose_name': 'Suptech File',
            },
        ),
        migrations.AddField(
            model_name='suptech',
            name='category',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='tools.suptechcategory'),
        ),
        migrations.AddField(
            model_name='suptech',
            name='created_by',
            field=models.ForeignKey(blank=True, editable=False, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='suptechs_created', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='suptech',
            name='modified_by',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='suptechs_modified', to=settings.AUTH_USER_MODEL),
        ),
        migrations.CreateModel(
            name='CsdSoftware',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('jig', models.CharField(max_length=100)),
                ('new_version', models.CharField(max_length=20)),
                ('old_version', models.CharField(blank=True, max_length=20, null=True)),
                ('link_download', models.CharField(max_length=500)),
                ('status', models.CharField(choices=[('Validé', 'Validé'), ('En test', 'En test'), ('Etudes', 'Etudes'), ('Abandonné', 'Abandonné'), ('PDI Only', 'PDI Only')], max_length=50)),
                ('validation_date', models.DateField(blank=True, null=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('created_by', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
