# Generated by Django 5.2.9 on 2025-12-17 18:29

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


class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name="CertificateBase",
            fields=[
                (
                    "id",
                    models.BigAutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("name", models.CharField(max_length=128, unique=True)),
                ("domain", models.CharField(max_length=253)),
                ("certificate_path", models.CharField(max_length=500)),
                ("certificate_key_path", models.CharField(max_length=500)),
                ("last_message", models.TextField(blank=True, default="")),
                ("created_at", models.DateTimeField(auto_now_add=True)),
                ("updated_at", models.DateTimeField(auto_now=True)),
            ],
            options={
                "verbose_name": "Certificate",
                "verbose_name_plural": "Certificates",
            },
        ),
        migrations.CreateModel(
            name="CertbotCertificate",
            fields=[
                (
                    "certificatebase_ptr",
                    models.OneToOneField(
                        auto_created=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        parent_link=True,
                        primary_key=True,
                        serialize=False,
                        to="certs.certificatebase",
                    ),
                ),
                ("email", models.EmailField(blank=True, max_length=254)),
                ("last_requested_at", models.DateTimeField(blank=True, null=True)),
            ],
            options={
                "verbose_name": "Certbot certificate",
                "verbose_name_plural": "Certbot certificates",
            },
            bases=("certs.certificatebase",),
        ),
        migrations.CreateModel(
            name="SelfSignedCertificate",
            fields=[
                (
                    "certificatebase_ptr",
                    models.OneToOneField(
                        auto_created=True,
                        on_delete=django.db.models.deletion.CASCADE,
                        parent_link=True,
                        primary_key=True,
                        serialize=False,
                        to="certs.certificatebase",
                    ),
                ),
                ("valid_days", models.PositiveIntegerField(default=365)),
                ("key_length", models.PositiveIntegerField(default=2048)),
                ("last_generated_at", models.DateTimeField(blank=True, null=True)),
            ],
            options={
                "verbose_name": "Self-signed certificate",
                "verbose_name_plural": "Self-signed certificates",
            },
            bases=("certs.certificatebase",),
        ),
    ]
