# Generated by Django 5.2.4 on 2025-09-16 02:40

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


class Migration(migrations.Migration):

    dependencies = [
        ("nodes", "0003_user_data_field"),
    ]

    operations = [
        migrations.RemoveField(
            model_name="node",
            name="clipboard_polling",
        ),
        migrations.RemoveField(
            model_name="node",
            name="has_lcd_screen",
        ),
        migrations.RemoveField(
            model_name="node",
            name="screenshot_polling",
        ),
        migrations.CreateModel(
            name="NodeFeatureAssignment",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("created_at", models.DateTimeField(auto_now_add=True)),
                (
                    "feature",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="node_assignments",
                        to="nodes.nodefeature",
                    ),
                ),
                (
                    "node",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="feature_assignments",
                        to="nodes.node",
                    ),
                ),
            ],
            options={
                "verbose_name": "Node Feature Assignment",
                "verbose_name_plural": "Node Feature Assignments",
                "unique_together": {("node", "feature")},
            },
        ),
        migrations.AddField(
            model_name="node",
            name="features",
            field=models.ManyToManyField(
                blank=True,
                related_name="nodes",
                through="nodes.NodeFeatureAssignment",
                to="nodes.nodefeature",
            ),
        ),
        migrations.AddField(
            model_name="emailoutbox",
            name="node",
            field=models.OneToOneField(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                related_name="email_outbox",
                to="nodes.node",
            ),
        ),
    ]
