forked from kodorvan/stcs
Added UserTimer
This commit is contained in:
@@ -1,4 +1,8 @@
|
||||
import logging
|
||||
from datetime import datetime
|
||||
|
||||
from sqlalchemy.sql.sqltypes import DateTime
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
from sqlalchemy import BigInteger, Boolean, Integer, String, ForeignKey
|
||||
@@ -151,3 +155,15 @@ class USER_DEALS(Base):
|
||||
|
||||
symbol = mapped_column(String(18), default='PENGUUSDT')
|
||||
side = mapped_column(String(10), nullable=False)
|
||||
open_price = mapped_column(Integer(), nullable=False)
|
||||
positive_percent = mapped_column(Integer(), nullable=False)
|
||||
|
||||
|
||||
class UserTimer(Base):
|
||||
__tablename__ = 'user_timers'
|
||||
|
||||
id: Mapped[int] = mapped_column(primary_key=True)
|
||||
tg_id = mapped_column(ForeignKey("user_telegram_id.tg_id"))
|
||||
timer_minutes = mapped_column(Integer, nullable=False, default=0)
|
||||
timer_start = mapped_column(DateTime, default=datetime.utcnow)
|
||||
timer_end = mapped_column(DateTime, nullable=True)
|
Reference in New Issue
Block a user