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)