init commit
This commit is contained in:
31
lottery/webapp/migrations/0001_initial.py
Normal file
31
lottery/webapp/migrations/0001_initial.py
Normal file
@@ -0,0 +1,31 @@
|
||||
# Generated by Django 5.1.6 on 2025-03-03 12:53
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
initial = True
|
||||
|
||||
dependencies = [
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='APISettings',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('api_url', models.URLField(verbose_name='API URL')),
|
||||
('api_key', models.CharField(max_length=255, verbose_name='API KEY')),
|
||||
],
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='Client',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('name', models.CharField(max_length=255, verbose_name='Имя')),
|
||||
('club_card_number', models.CharField(max_length=100, unique=True, verbose_name='Номер клубной карты')),
|
||||
('telegram_id', models.CharField(blank=True, max_length=50, null=True, verbose_name='Telegram ID')),
|
||||
],
|
||||
),
|
||||
]
|
||||
42
lottery/webapp/migrations/0002_invoice.py
Normal file
42
lottery/webapp/migrations/0002_invoice.py
Normal file
@@ -0,0 +1,42 @@
|
||||
# Generated by Django 5.1.6 on 2025-03-06 10:01
|
||||
|
||||
import django.core.validators
|
||||
from decimal import Decimal
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('webapp', '0001_initial'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='Invoice',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('api_id', models.CharField(max_length=255, unique=True, verbose_name='API Invoice ID')),
|
||||
('invoice_type', models.CharField(default='Invoice', max_length=50, verbose_name='Type')),
|
||||
('created_at', models.DateTimeField(verbose_name='Created at')),
|
||||
('closed_at', models.DateTimeField(blank=True, null=True, verbose_name='Closed at')),
|
||||
('ext_id', models.CharField(blank=True, max_length=255, null=True, verbose_name='External ID')),
|
||||
('ext_type', models.CharField(blank=True, max_length=255, null=True, verbose_name='External Type')),
|
||||
('client_api_id', models.CharField(blank=True, max_length=255, null=True, verbose_name='Client API ID')),
|
||||
('client_type', models.CharField(blank=True, max_length=50, null=True, verbose_name='Client Type')),
|
||||
('client_name', models.CharField(blank=True, max_length=255, null=True, verbose_name='Client Name')),
|
||||
('client_club_card_number', models.CharField(blank=True, max_length=100, null=True, verbose_name='Club Card Number')),
|
||||
('sum', models.DecimalField(decimal_places=2, default=Decimal('0.00'), max_digits=10, validators=[django.core.validators.MinValueValidator(Decimal('0.00'))], verbose_name='Sum')),
|
||||
('company_number', models.PositiveIntegerField(default=0, verbose_name='Company Number')),
|
||||
('bonus', models.DecimalField(blank=True, decimal_places=2, max_digits=10, null=True, validators=[django.core.validators.MinValueValidator(Decimal('0.00'))], verbose_name='Bonus')),
|
||||
('start_bonus', models.DecimalField(blank=True, decimal_places=2, max_digits=10, null=True, validators=[django.core.validators.MinValueValidator(Decimal('0.00'))], verbose_name='Start Bonus')),
|
||||
('deposit_sum', models.DecimalField(decimal_places=2, default=Decimal('0.00'), max_digits=10, validators=[django.core.validators.MinValueValidator(Decimal('0.00'))], verbose_name='Deposit Sum')),
|
||||
('notes', models.TextField(blank=True, null=True, verbose_name='Notes')),
|
||||
],
|
||||
options={
|
||||
'verbose_name': 'Invoice',
|
||||
'verbose_name_plural': 'Invoices',
|
||||
'ordering': ['-created_at'],
|
||||
},
|
||||
),
|
||||
]
|
||||
@@ -0,0 +1,21 @@
|
||||
# Generated by Django 5.1.6 on 2025-03-06 10:52
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('webapp', '0002_invoice'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterModelOptions(
|
||||
name='client',
|
||||
options={'verbose_name': 'Клиент', 'verbose_name_plural': 'Клиенты'},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='invoice',
|
||||
options={'ordering': ['-created_at'], 'verbose_name': 'Счет', 'verbose_name_plural': 'Счета'},
|
||||
),
|
||||
]
|
||||
18
lottery/webapp/migrations/0004_client_bot_admin.py
Normal file
18
lottery/webapp/migrations/0004_client_bot_admin.py
Normal file
@@ -0,0 +1,18 @@
|
||||
# Generated by Django 5.1.6 on 2025-03-21 03:44
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('webapp', '0003_alter_client_options_alter_invoice_options'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='client',
|
||||
name='bot_admin',
|
||||
field=models.BooleanField(default=False, help_text='Является ли пользователь администратором бота'),
|
||||
),
|
||||
]
|
||||
28
lottery/webapp/migrations/0005_bindingrequest.py
Normal file
28
lottery/webapp/migrations/0005_bindingrequest.py
Normal file
@@ -0,0 +1,28 @@
|
||||
# Generated by Django 5.1.6 on 2025-03-21 03:48
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('webapp', '0004_client_bot_admin'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='BindingRequest',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('telegram_chat_id', models.CharField(help_text='Идентификатор чата Telegram пользователя', max_length=50)),
|
||||
('client_card', models.CharField(help_text='Номер клиентской карты', max_length=100)),
|
||||
('status', models.CharField(choices=[('pending', 'Ожидает проверки'), ('approved', 'Подтверждён'), ('rejected', 'Отклонён')], default='pending', max_length=20)),
|
||||
('created_at', models.DateTimeField(auto_now_add=True)),
|
||||
('processed_at', models.DateTimeField(blank=True, null=True)),
|
||||
],
|
||||
options={
|
||||
'verbose_name': 'Запрос на сопоставление',
|
||||
'verbose_name_plural': 'Запросы на сопоставления',
|
||||
},
|
||||
),
|
||||
]
|
||||
19
lottery/webapp/migrations/0006_bindingrequest_client.py
Normal file
19
lottery/webapp/migrations/0006_bindingrequest_client.py
Normal file
@@ -0,0 +1,19 @@
|
||||
# Generated by Django 5.1.6 on 2025-03-21 04:15
|
||||
|
||||
import django.db.models.deletion
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('webapp', '0005_bindingrequest'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='bindingrequest',
|
||||
name='client',
|
||||
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='webapp.client'),
|
||||
),
|
||||
]
|
||||
18
lottery/webapp/migrations/0007_client_chat_disabled.py
Normal file
18
lottery/webapp/migrations/0007_client_chat_disabled.py
Normal file
@@ -0,0 +1,18 @@
|
||||
# Generated by Django 5.1.6 on 2025-03-21 12:49
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('webapp', '0006_bindingrequest_client'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='client',
|
||||
name='chat_disabled',
|
||||
field=models.BooleanField(default=False, help_text='Если установлено, пользователь не может отправлять сообщения в чат.', verbose_name='Блокировка отправки сообщений'),
|
||||
),
|
||||
]
|
||||
18
lottery/webapp/migrations/0008_invoice_used.py
Normal file
18
lottery/webapp/migrations/0008_invoice_used.py
Normal file
@@ -0,0 +1,18 @@
|
||||
# Generated by Django 5.1.6 on 2025-03-22 22:22
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('webapp', '0007_client_chat_disabled'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='invoice',
|
||||
name='used',
|
||||
field=models.BooleanField(default=False, verbose_name='Использован в розыгрыше'),
|
||||
),
|
||||
]
|
||||
0
lottery/webapp/migrations/__init__.py
Normal file
0
lottery/webapp/migrations/__init__.py
Normal file
Reference in New Issue
Block a user