# Generated by Django 4.2.2 on 2024-04-19 16:24

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('SubscribesApp', '0003_alter_subscribe_bg_color_alter_subscribe_text_color'),
    ]

    operations = [
        migrations.CreateModel(
            name='SubscribeOrder',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.TextField(blank=True, help_text='Название', null=True, verbose_name='Название')),
                ('name_plural', models.TextField(blank=True, null=True, verbose_name='Название (множественное число)')),
                ('order', models.IntegerField(blank=True, null=True, verbose_name='Очередность отображения')),
                ('createDT', models.DateTimeField(auto_now_add=True, verbose_name='Дата и время создания')),
                ('modifiedDT', models.DateTimeField(blank=True, null=True, verbose_name='Дата и время последнего изменения')),
                ('enable', models.BooleanField(db_index=True, default=True, verbose_name='Включено')),
                ('json_data', models.JSONField(blank=True, default=dict, verbose_name='Дополнительные данные')),
                ('sum', models.PositiveSmallIntegerField(verbose_name='Сумма')),
                ('currency', models.CharField(max_length=3, verbose_name='Валюта')),
                ('segment', models.CharField(verbose_name='ID Сегмента')),
                ('merchant_order_id', models.CharField(verbose_name='merchant_order_id')),
                ('bank_order_id', models.CharField(verbose_name='ID заказа в банке')),
                ('status', models.CharField(verbose_name='Статус заказа в банке')),
                ('subscribe', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='subscribe_orders_for_subscribe', to='SubscribesApp.subscribe', verbose_name='Подписка')),
                ('subscribe_for_user', models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='subscribe_orders_for_user_subscribe', to='SubscribesApp.subscribeforuser', verbose_name='Подписка пользователя')),
                ('user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='subscribe_orders_for_user', to='SubscribesApp.subscribe', verbose_name='Пользователь')),
            ],
            options={
                'verbose_name': 'Заказ на подписку',
                'verbose_name_plural': 'Заказы на подписки',
            },
        ),
    ]
