# Generated by Django 5.1.4 on 2024-12-09 09:30

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('hotels', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='PMSConfiguration',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255, verbose_name='Название PMS')),
                ('url', models.URLField(verbose_name='URL API')),
                ('token', models.CharField(blank=True, max_length=255, null=True, verbose_name='Токен')),
                ('username', models.CharField(blank=True, max_length=255, null=True, verbose_name='Логин')),
                ('password', models.CharField(blank=True, max_length=255, null=True, verbose_name='Пароль')),
                ('plugin_name', models.CharField(max_length=255, verbose_name='Название плагина')),
                ('created_at', models.DateTimeField(auto_now_add=True, verbose_name='Дата создания')),
            ],
            options={
                'verbose_name': 'PMS система',
                'verbose_name_plural': 'PMS системы',
            },
        ),
        migrations.CreateModel(
            name='PMSIntegrationLog',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('checked_at', models.DateTimeField(auto_now_add=True, verbose_name='Время проверки')),
                ('status', models.CharField(choices=[('success', 'Успех'), ('error', 'Ошибка')], max_length=50, verbose_name='Статус')),
                ('message', models.TextField(blank=True, null=True, verbose_name='Сообщение')),
                ('hotel', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='hotels.hotel', verbose_name='Отель')),
            ],
            options={
                'verbose_name': 'Журнал интеграции PMS',
                'verbose_name_plural': 'Журналы интеграции PMS',
                'indexes': [models.Index(fields=['hotel'], name='pms_integra_hotel_i_ade4da_idx'), models.Index(fields=['checked_at'], name='pms_integra_checked_938acc_idx'), models.Index(fields=['status'], name='pms_integra_status_358b64_idx')],
            },
        ),
    ]
