Commit Graph

396 Commits

Author SHA1 Message Date
Egor
f8564f353f Merge pull request #2415 from BEDOLAGA-DEV/email
Email
2026-01-25 13:30:35 +03:00
Egor
4f84dc6324 Update database.py 2026-01-25 13:28:28 +03:00
Egor
658b48f154 Merge pull request #2412 from BEDOLAGA-DEV/email
Email
2026-01-25 11:55:22 +03:00
Egor
6f40cdd09c Update user.py 2026-01-25 11:52:24 +03:00
c0mrade
9a2aea038a chore: add uv package manager and ruff linter configuration
- Add pyproject.toml with uv and ruff configuration
- Pin Python version to 3.13 via .python-version
- Add Makefile commands: lint, format, fix
- Apply ruff formatting to entire codebase
- Remove unused imports (base64 in yookassa/simple_subscription)
- Update .gitignore for new config files
2026-01-24 17:45:27 +03:00
Egor
7e37bc4409 Update subscription.py 2026-01-24 11:23:28 +03:00
Egor
890c219d90 Update universal_migration.py 2026-01-24 11:13:30 +03:00
Egor
c27128aa30 Update models.py 2026-01-24 11:12:42 +03:00
Egor
cd80164bee Update user.py 2026-01-24 09:56:06 +03:00
Egor
3d9a8c39dc Update user.py 2026-01-24 09:51:13 +03:00
Egor
0a0fc48463 Add files via upload 2026-01-23 11:23:51 +03:00
Egor
085459dfd3 Update transaction.py 2026-01-22 22:34:09 +03:00
Egor
5930506972 Merge pull request #2379 from Gy9vin/main
feat(payments): добавить KassaAI как отдельную платёжную систему
2026-01-21 16:12:00 +03:00
Egor
86c2092eff Update subscription.py 2026-01-21 15:43:29 +03:00
gy9vin
7aa64521d2 feat(payments): добавить KassaAI как отдельную платёжную систему
Новая платёжка KassaAI (api.fk.life) работает параллельно с Freekassa.

  Добавлено:
  - app/services/kassa_ai_service.py — API-сервис
  - app/database/crud/kassa_ai.py — CRUD-операции
  - app/services/payment/kassa_ai.py — KassaAiPaymentMixin
  - app/handlers/balance/kassa_ai.py — хендлеры пополнения

  Изменено:
  - config.py — настройки KASSA_AI_*
  - models.py — PaymentMethod.KASSA_AI, модель KassaAiPayment
  - payment_service.py — подключён KassaAiPaymentMixin
  - webserver/payments.py — webhook /kassa-ai-webhook
  - keyboards/inline.py — кнопка KassaAI
  - handlers/balance/main.py — регистрация хендлеров
  - universal_migration.py — миграция таблицы kassa_ai_payments
  - system_settings_service.py — настройки в админке
  - .env.example — примеры переменных

  Способы оплаты: 44=СБП, 36=Карты РФ, 43=SberPay
2026-01-20 19:09:27 +03:00
Egor
33e11fb25a Update database.py 2026-01-20 16:55:35 +03:00
Egor
8ad2d50b25 Add files via upload 2026-01-20 00:18:57 +03:00
Egor
b38e06383d Update user.py 2026-01-19 23:57:03 +03:00
Egor
57981b69c7 Update server_squad.py 2026-01-19 23:46:41 +03:00
PEDZEO
b1206a84c7 feat(notifications): enhance notification security and ownership checks
- Added ownership verification for user notifications to ensure only the rightful owner can mark them as read.
- Implemented checks to confirm that admin notifications are correctly identified before allowing them to be marked as read.
- Introduced a new method to retrieve notifications by ID in the TicketNotificationCRUD for improved data handling.
2026-01-19 00:39:36 +03:00
PEDZEO
67c3dba1cc feat(notifications): implement ticket notifications for users and admins
- Added a new TicketNotification model to handle notifications for ticket events.
- Implemented user and admin notifications for new tickets and replies in the cabinet.
- Introduced settings to enable or disable notifications for users and admins.
- Enhanced ticket settings to include notification preferences.
- Integrated WebSocket notifications for real-time updates.
2026-01-19 00:02:41 +03:00
Egor
15e7725cf7 Update tariff.py 2026-01-18 05:47:59 +03:00
libkit
ff45a3e28d feat(models): добавить тип DISCOUNT в PromoCodeType
Добавлен новый тип промокода для одноразовых скидок.
Использует существующие поля без изменения схемы БД:
- balance_bonus_kopeks для хранения процента скидки (1-100)
- subscription_days для хранения срока действия скидки в часах (0-8760)
2026-01-17 11:17:30 +05:00
Egor
08d202161c Update campaign.py 2026-01-17 05:01:12 +03:00
Egor
c4cde5efa2 Add files via upload 2026-01-17 05:00:47 +03:00
Egor
7106c89711 Update subscription.py 2026-01-16 08:40:01 +03:00
Egor
dcaf2b8103 Update tariff.py 2026-01-16 08:35:26 +03:00
Egor
1024a88d19 Add files via upload 2026-01-16 08:34:56 +03:00
Egor
7cacc73187 Update tariff.py 2026-01-16 06:18:20 +03:00
Egor
e22e786c88 Update tariff.py 2026-01-16 06:01:50 +03:00
Egor
a32e3fc582 Add files via upload 2026-01-16 06:01:23 +03:00
Egor
ec9eaf4271 Update subscription_conversion.py 2026-01-16 03:28:01 +03:00
Egor
176d17fe40 Update subscription_conversion.py 2026-01-16 03:18:53 +03:00
Egor
395646168d Update subscription.py 2026-01-16 00:50:03 +03:00
Egor
c4382ff69d Add files via upload 2026-01-15 17:31:39 +03:00
Egor
13770a01c6 Add files via upload 2026-01-15 17:31:15 +03:00
Egor
7f65d398bf Update models.py 2026-01-15 16:56:19 +03:00
Egor
9c2b17af3b Update subscription.py 2026-01-14 04:12:18 +03:00
Egor
a1ab2f3727 Update tariff.py 2026-01-14 02:39:58 +03:00
PEDZEO
a686333603 Add support for custom days and traffic in tariffs
- Introduced fields for custom days and traffic in the tariff model, including enabling flags, pricing, and limits.
- Updated relevant routes and schemas to handle new tariff features.
- Implemented logic for purchasing and managing custom days and traffic in subscriptions.
- Added database migration scripts to accommodate new columns for tariffs and subscriptions.
2026-01-13 02:55:32 +03:00
PEDZEO
ac5850746e Merge pull request #2271 from BEDOLAGA-DEV/main
merge main
2026-01-12 22:25:49 +03:00
Egor
40fad0d537 Update subscription.py 2026-01-12 18:56:24 +03:00
Egor
67f60ba41a Update subscription.py 2026-01-12 18:44:34 +03:00
Egor
db54b01f04 Update subscription.py 2026-01-12 18:16:59 +03:00
Egor
26e242cac7 Update subscription.py 2026-01-12 18:12:14 +03:00
Egor
640a80953f Update subscription.py 2026-01-12 16:31:00 +03:00
Egor
472ef37490 Add files via upload 2026-01-12 15:25:25 +03:00
Egor
9e4fa9defe Add files via upload 2026-01-12 15:24:59 +03:00
PEDZEO
15f6108674 feat(tariffs): добавлена поддержка докупки трафика и улучшения тарифов
- Реализована возможность докупки трафика для тарифов с новыми параметрами: traffic_topup_enabled, traffic_topup_packages и max_topup_traffic_gb.
- Обновлены схемы и маршруты для управления тарифами и трафиком.
- Добавлены новые эндпоинты для работы с докупкой трафика в мини-приложении.
- Обновлены настройки и логика для проверки доступности докупки трафика в зависимости от тарифа.
- Внедрены улучшения в обработку платежей через Freekassa.

Обновлён .env.example с новыми параметрами для режима тарифов.
2026-01-12 07:47:35 +03:00
PEDZEO
0e24a5505c feat(subscription): добавлены новые функции для управления тарифами и трафиком
- Обновлены схемы и маршруты для поддержки покупки тарифов и управления трафиком.
- Реализована синхронизация тарифов и серверов из RemnaWave при запуске.
- Добавлены новые параметры в тарифы: server_traffic_limits и allow_traffic_topup.
- Обновлены настройки и логика для проверки доступности докупки трафика в зависимости от тарифа.
- Внедрены новые эндпоинты для работы с колесом удачи и обработка платежей через Stars.

Обновлён .env.example с новыми параметрами для режима продаж подписок.
2026-01-12 07:41:10 +03:00