# Generated by Django 4.2.13 on 2024-06-03 15:05

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Authority',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('authority_name', models.CharField(choices=[('Environmental Protection Agency (EPA)', 'Epa'), ('Local Government', 'Local Government'), ('Health and Safety Authority', 'Health Safety'), ('Waste Management Authority', 'Waste Management'), ('Recycling Compliance Board', 'Recycling Board'), ('Sustainability Council', 'Sustainability Council')], max_length=100)),
                ('contact_info', models.TextField()),
            ],
        ),
        migrations.CreateModel(
            name='Customer',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('contact_info', models.TextField()),
            ],
        ),
        migrations.CreateModel(
            name='Material',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('material_name', models.CharField(choices=[('Metal', 'Metal'), ('Plastic', 'Plastic'), ('Glass', 'Glass'), ('Paper', 'Paper'), ('Electronic Waste', 'Electronic Waste'), ('Organic Waste', 'Organic Waste'), ('Textile', 'Textile')], max_length=100)),
                ('description', models.TextField()),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
            ],
        ),
        migrations.CreateModel(
            name='Operation',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('operation_type', models.CharField(choices=[('Collection', 'Collection'), ('Sorting', 'Sorting'), ('Processing', 'Processing'), ('Shredding', 'Shredding'), ('Melting', 'Melting'), ('Granulating', 'Granulating'), ('Packaging', 'Packaging'), ('Distribution', 'Distribution')], max_length=100)),
                ('quantity', models.DecimalField(decimal_places=2, max_digits=10)),
                ('operation_date', models.DateTimeField()),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('customer', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='recycle_core.customer')),
                ('material', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='recycle_core.material')),
            ],
        ),
        migrations.CreateModel(
            name='Permission',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('permission_name', models.CharField(max_length=100)),
            ],
        ),
        migrations.CreateModel(
            name='Role',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('role_name', models.CharField(max_length=100)),
            ],
        ),
        migrations.CreateModel(
            name='User',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('username', models.CharField(max_length=100)),
                ('password_hash', models.CharField(max_length=255)),
                ('email', models.EmailField(max_length=254, unique=True)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('role', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='recycle_core.role')),
            ],
        ),
        migrations.CreateModel(
            name='SustainabilityTracking',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('carbon_footprint', models.DecimalField(decimal_places=2, max_digits=10)),
                ('sustainability_measures', models.TextField()),
                ('operation', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='recycle_core.operation')),
            ],
        ),
        migrations.CreateModel(
            name='SupportTicket',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('issue', models.TextField()),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('resolution', models.TextField(blank=True, null=True)),
                ('customer', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='recycle_core.customer')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='recycle_core.user')),
            ],
        ),
        migrations.CreateModel(
            name='RolePermission',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('permission', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='recycle_core.permission')),
                ('role', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='recycle_core.role')),
            ],
        ),
        migrations.CreateModel(
            name='Report',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('report_name', models.CharField(choices=[('Collection Report', 'Collection'), ('Processing Report', 'Processing'), ('Recycling Efficiency Report', 'Efficiency'), ('Compliance Report', 'Compliance'), ('Sustainability Report', 'Sustainability'), ('Financial Report', 'Financial'), ('Inventory Report', 'Inventory')], max_length=100)),
                ('report_data', models.TextField()),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='recycle_core.user')),
            ],
        ),
        migrations.CreateModel(
            name='Regulation',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('regulation_name', models.CharField(choices=[('Environmental Protection Act', 'Environmental Protection'), ('Waste Management Act', 'Waste Management'), ('Recycling and Reuse Guidelines', 'Recycling Guidelines'), ('Hazardous Waste Regulations', 'Hazardous Waste'), ('Air Quality Standards', 'Air Quality'), ('Water Quality Standards', 'Water Quality'), ('Occupational Health and Safety Regulations', 'Health Safety')], max_length=100)),
                ('description', models.TextField()),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('authority', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='recycle_core.authority')),
            ],
        ),
        migrations.CreateModel(
            name='MaterialDetail',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('subtype', models.CharField(max_length=100)),
                ('material', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='recycle_core.material')),
            ],
        ),
        migrations.CreateModel(
            name='ComplianceCheck',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('status', models.CharField(choices=[('Pending', 'Pending'), ('In Progress', 'In Progress'), ('Completed', 'Completed'), ('Failed', 'Failed'), ('Not Applicable', 'Not Applicable')], max_length=100)),
                ('check_date', models.DateTimeField()),
                ('remarks', models.TextField()),
                ('operation', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='recycle_core.operation')),
                ('regulation', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='recycle_core.regulation')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='recycle_core.user')),
            ],
        ),
        migrations.CreateModel(
            name='AuditLog',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('action', models.CharField(max_length=255)),
                ('action_details', models.TextField()),
                ('action_time', models.DateTimeField(auto_now_add=True)),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='recycle_core.user')),
            ],
        ),
    ]
