# Generated by Django 5.1.1 on 2024-09-17 17:17

import django.core.validators
import django.db.models.deletion
import djgeojson.fields
from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ("djeocad", "0001_initial"),
    ]

    operations = [
        migrations.AlterModelOptions(
            name="drawing",
            options={"verbose_name": "Drawing", "verbose_name_plural": "Drawings"},
        ),
        migrations.AddField(
            model_name="drawing",
            name="designx",
            field=models.FloatField(default=0, verbose_name="Design point X..."),
        ),
        migrations.AddField(
            model_name="drawing",
            name="designy",
            field=models.FloatField(default=0, verbose_name="...Y"),
        ),
        migrations.AddField(
            model_name="drawing",
            name="dxf",
            field=models.FileField(
                default="uploads/djeocad/dxf/sample.dxf",
                max_length=200,
                upload_to="uploads/djeocad/dxf/",
                validators=[
                    django.core.validators.FileExtensionValidator(
                        allowed_extensions=["dxf"]
                    )
                ],
                verbose_name="DXF file",
            ),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name="drawing",
            name="epsg",
            field=models.IntegerField(
                editable=False, null=True, verbose_name="CRS code"
            ),
        ),
        migrations.AddField(
            model_name="drawing",
            name="geom",
            field=djgeojson.fields.PointField(
                blank=True, null=True, verbose_name="Location"
            ),
        ),
        migrations.AddField(
            model_name="drawing",
            name="image",
            field=models.ImageField(
                blank=True,
                null=True,
                upload_to="uploads/djeocad/images/",
                verbose_name="Image",
            ),
        ),
        migrations.AddField(
            model_name="drawing",
            name="parent",
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                related_name="parent_drawing",
                to="djeocad.drawing",
                verbose_name="Parent Drawing",
            ),
        ),
        migrations.AddField(
            model_name="drawing",
            name="rotation",
            field=models.FloatField(default=0, verbose_name="Rotation"),
        ),
    ]
