# Generated by Django 5.2 on 2025-06-18 20:47

import uuid
from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ('api', '0026_remove_userquota_task_quota_and_more'),
    ]

    operations = [
        migrations.CreateModel(
            name='ProxyServer',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('name', models.CharField(help_text='Human-readable name for this proxy', max_length=128)),
                ('proxy_type', models.CharField(choices=[('HTTP', 'HTTP'), ('HTTPS', 'HTTPS'), ('SOCKS4', 'SOCKS4'), ('SOCKS5', 'SOCKS5')], default='HTTP', help_text='Type of proxy protocol', max_length=8)),
                ('host', models.CharField(help_text='Proxy server hostname or IP', max_length=256)),
                ('port', models.PositiveIntegerField(help_text='Proxy server port')),
                ('username', models.CharField(blank=True, help_text='Username for proxy authentication', max_length=128)),
                ('password', models.CharField(blank=True, help_text='Password for proxy authentication', max_length=128)),
                ('static_ip', models.GenericIPAddressField(blank=True, help_text='Static IP address assigned to this proxy (if known)', null=True)),
                ('is_active', models.BooleanField(default=True, help_text='Whether this proxy is currently active')),
                ('notes', models.TextField(blank=True, help_text='Additional notes about this proxy server')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
            ],
            options={
                'ordering': ['-created_at'],
                'indexes': [models.Index(fields=['host'], name='api_proxyse_host_773d08_idx'), models.Index(fields=['port'], name='api_proxyse_port_989537_idx'), models.Index(fields=['proxy_type'], name='api_proxyse_proxy_t_518d08_idx'), models.Index(fields=['is_active'], name='api_proxyse_is_acti_bf41d3_idx'), models.Index(fields=['static_ip'], name='api_proxyse_static__725e1c_idx')],
                'constraints': [models.UniqueConstraint(fields=('host', 'port'), name='unique_proxy_server_host_port')],
            },
        ),
    ]
