# Generated by Django 5.0.3 on 2024-03-18 21:17

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


class Migration(migrations.Migration):
    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name="CameraSettings",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("aperture", models.FloatField(null=True)),
                ("brightness", models.IntegerField(null=True)),
                ("saturation", models.IntegerField(null=True)),
                ("contrast", models.IntegerField(null=True)),
                ("sharpness", models.IntegerField(null=True)),
                ("hue", models.IntegerField(null=True)),
            ],
        ),
        migrations.CreateModel(
            name="Camera",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("name", models.CharField(max_length=100)),
                ("ip", models.GenericIPAddressField()),
                ("username", models.CharField(max_length=100, null=True)),
                ("password", models.CharField(max_length=100, null=True)),
                (
                    "default_settings",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        to="ptz_app.camerasettings",
                    ),
                ),
            ],
        ),
        migrations.CreateModel(
            name="Preset",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("name", models.CharField(max_length=100)),
                ("order", models.IntegerField()),
                ("thumbnail", models.ImageField(upload_to="")),
                ("pan", models.FloatField()),
                ("tilt", models.FloatField()),
                ("zoom", models.FloatField()),
                ("focus", models.FloatField()),
                (
                    "camera",
                    models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to="ptz_app.camera"),
                ),
                (
                    "settings",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        to="ptz_app.camerasettings",
                    ),
                ),
            ],
        ),
    ]
