# Generated by Django 4.2.16 on 2024-10-18 10:46

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import gestionale.models


class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Bundle',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('product_type', models.CharField(max_length=255)),
                ('product_name', models.CharField(max_length=255)),
                ('qt', models.IntegerField()),
                ('qt_available', models.IntegerField()),
                ('notes', models.CharField(blank=True, max_length=255)),
                ('brand', models.CharField(max_length=255)),
                ('line', models.CharField(max_length=255)),
                ('cpu', models.CharField(blank=True, max_length=255)),
                ('ram', models.CharField(blank=True, max_length=255)),
                ('storage_size', models.CharField(blank=True, max_length=255)),
                ('price', models.DecimalField(decimal_places=2, max_digits=10)),
                ('delivery_date', models.DateField()),
                ('is_deleted', models.BooleanField(default=False)),
            ],
        ),
        migrations.CreateModel(
            name='Course',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('course_name', models.CharField(blank=True, max_length=255)),
                ('course_name_extended', models.CharField(blank=True, max_length=255)),
                ('course_code', models.CharField(max_length=255)),
                ('course_year', models.IntegerField(blank=True)),
                ('student_number', models.IntegerField(blank=True, null=True)),
                ('course_location', models.CharField(max_length=255)),
                ('course_status', models.BooleanField(default=True)),
            ],
        ),
        migrations.CreateModel(
            name='Record',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date', models.DateField()),
                ('action', models.CharField(max_length=255)),
                ('user', models.CharField(max_length=255)),
                ('product', models.CharField(max_length=255)),
                ('product_detail', models.TextField(null=True)),
                ('prev_product_detail', models.TextField(null=True)),
            ],
        ),
        migrations.CreateModel(
            name='Student',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('profile_image', models.ImageField(blank=True, null=True, upload_to='profile_pictures/', validators=[gestionale.models.validate_image])),
                ('first_name', models.CharField(max_length=255)),
                ('last_name', models.CharField(max_length=255)),
                ('birth_date', models.DateField()),
                ('codice_fiscale', models.CharField(max_length=255)),
                ('gender', models.CharField(max_length=255)),
                ('id_student_course', models.IntegerField(blank=True, null=True)),
                ('course_acronym', models.CharField(max_length=255)),
                ('email_user', models.EmailField(max_length=255)),
                ('phone_number', models.CharField(max_length=255)),
                ('municipality_residence', models.CharField(max_length=255)),
                ('province_residence', models.CharField(max_length=255)),
                ('municipality_birth', models.CharField(max_length=255)),
                ('province_birth', models.CharField(max_length=255)),
                ('nation_birth', models.CharField(max_length=255)),
                ('resignation_date', models.DateField(blank=True, null=True)),
                ('student_status', models.CharField(max_length=255)),
                ('course_id', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='students', to='gestionale.course')),
            ],
        ),
        migrations.CreateModel(
            name='StudentViewEditModel',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('profile_image', models.ImageField(blank=True, null=True, upload_to='profile_pictures/', validators=[gestionale.models.validate_image])),
            ],
        ),
        migrations.CreateModel(
            name='Supplier',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('supplier_name', models.CharField(max_length=255)),
                ('supplier_address', models.CharField(max_length=255)),
                ('supplier_phone', models.CharField(max_length=255)),
                ('supplier_email', models.EmailField(max_length=255)),
                ('partita_iva', models.CharField(max_length=255)),
                ('codice_societa', models.CharField(max_length=255)),
            ],
        ),
        migrations.CreateModel(
            name='Ticket',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=255)),
                ('content', models.TextField()),
                ('submit_date', models.DateField()),
                ('closing_date', models.DateField(blank=True, null=True)),
                ('is_closed', models.BooleanField(default=False)),
                ('id_student', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='gestionale.student')),
                ('id_user_in_charge', models.ForeignKey(blank=True, limit_choices_to={'is_staff': True}, null=True, on_delete=django.db.models.deletion.PROTECT, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Computer',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('status', models.CharField(max_length=255)),
                ('assignment_date', models.DateField(blank=True, null=True)),
                ('assignment_motivation', models.CharField(blank=True, max_length=255, null=True)),
                ('return_date', models.DateField(blank=True, null=True)),
                ('return_motivation', models.CharField(blank=True, max_length=255, null=True)),
                ('eol', models.BooleanField(default=False)),
                ('eol_date', models.DateField(blank=True, null=True)),
                ('notes', models.CharField(blank=True, max_length=255, null=True)),
                ('cespite', models.CharField(blank=True, max_length=255, null=True)),
                ('serial', models.CharField(max_length=255, unique=True)),
                ('is_deleted', models.BooleanField(default=False)),
                ('id_bundle', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='bundles', to='gestionale.bundle')),
                ('id_student', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to='gestionale.student')),
            ],
        ),
        migrations.AddField(
            model_name='bundle',
            name='supplier_id',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='gestionale.supplier'),
        ),
        migrations.CreateModel(
            name='Accessory',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255)),
                ('status', models.CharField(max_length=255)),
                ('description', models.CharField(max_length=255)),
                ('assignment_date', models.DateField(blank=True, null=True)),
                ('assignment_motivation', models.CharField(blank=True, max_length=255, null=True)),
                ('return_date', models.DateField(blank=True, null=True)),
                ('return_motivation', models.CharField(blank=True, max_length=255, null=True)),
                ('notes', models.CharField(blank=True, max_length=255, null=True)),
                ('is_deleted', models.BooleanField(default=False)),
                ('id_bundle', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='bundles_accessory', to='gestionale.bundle')),
                ('id_student', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to='gestionale.student')),
            ],
        ),
    ]
