19 lines
784 B
Python
19 lines
784 B
Python
from sqlalchemy import Column, Integer, String, Float, Boolean, Text
|
|
from sqlalchemy.orm import relationship
|
|
|
|
from app.db.base_class import Base
|
|
|
|
|
|
class Bot(Base):
|
|
id = Column(Integer, primary_key=True, index=True)
|
|
name = Column(String, nullable=False)
|
|
description = Column(Text, nullable=True)
|
|
roi_percentage = Column(Float, nullable=False) # Expected ROI percentage
|
|
duration_hours = Column(Integer, nullable=False) # Duration in hours
|
|
min_purchase_amount = Column(Float, nullable=False)
|
|
max_purchase_amount = Column(Float, nullable=False)
|
|
is_active = Column(Boolean, default=True)
|
|
image_path = Column(String, nullable=True)
|
|
|
|
# Relationships
|
|
purchases = relationship("BotPurchase", back_populates="bot", cascade="all, delete-orphan") |