From 8348a9b44b94bab9aa08e115ba03ed09b459e6e9 Mon Sep 17 00:00:00 2001 From: root Date: Sat, 29 Nov 2025 20:00:12 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9C=D0=B5=D0=BB=D0=BA=D0=B8=D0=B5=20=D0=B8?= =?UTF-8?q?=D0=B7=D0=BC=D0=B5=D0=BD=D0=B5=D0=BD=D0=B8=D1=8F=20=D0=B2=20?= =?UTF-8?q?=D0=BC=D0=BE=D0=B4=D0=B5=D0=BB=D0=B8=20=D0=B8=20=D0=B4=D0=B5?= =?UTF-8?q?=D0=B1=D0=B0=D0=B3=20=D0=B4=D0=BB=D1=8F=20=D0=BE=D1=88=D0=B8?= =?UTF-8?q?=D0=B1=D0=BA=D0=B8=20=D0=B2=20=D0=BF=D0=BE=D0=BB=D1=83=D1=87?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B8=20=D1=82=D1=80=D0=B0=D0=BD=D0=B7=D0=B0?= =?UTF-8?q?=D0=BA=D1=86=D0=B8=D0=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/routes/user_routes.py | 4 ++-- instance/model.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/routes/user_routes.py b/app/routes/user_routes.py index f80e413..060ac2d 100644 --- a/app/routes/user_routes.py +++ b/app/routes/user_routes.py @@ -139,7 +139,7 @@ async def last_transactions( """ logger.info(f"Получен запрос на транзакции для пользователя: {telegram_id}") try: - logger.debug(f"Вызов метода get_transaction с user_id={telegram_id}") + logger.info(f"Вызов метода get_transaction с user_id={telegram_id}") transactions = await db_manager.get_transaction(telegram_id) if transactions == "ERROR": @@ -149,7 +149,7 @@ async def last_transactions( response = [] logger.info(f"Формирование ответа для пользователя {telegram_id}: {response}") return response - logger.debug(f"Транзакции для {telegram_id}: {transactions}") + logger.info(f"Транзакции для {telegram_id}: {transactions}") response = [ { "id": tx.id, diff --git a/instance/model.py b/instance/model.py index ecd940e..4be560a 100644 --- a/instance/model.py +++ b/instance/model.py @@ -29,7 +29,7 @@ class User(Base): telegram_id = Column(BigInteger, primary_key=True) username = Column(String(255)) balance = Column(Numeric(10, 2), default=0.0) - ref_code = Column(String(32), unique=True) # Реферальный код пользователя + ref_code = Column(String(7), unique=True) # Реферальный код пользователя invited_by = Column(BigInteger, ForeignKey('users.telegram_id'), nullable=True) created_at = Column(DateTime, default=datetime.utcnow) updated_at = Column(DateTime, default=datetime.utcnow, onupdate=datetime.utcnow)