15 lines
465 B
Python
15 lines
465 B
Python
from sqlalchemy import Column, Integer, String, JSON
|
|
from config.database import Base
|
|
|
|
|
|
class Distribution(Base):
|
|
__tablename__ = "distribution"
|
|
|
|
id = Column(Integer, primary_key=True, index=True)
|
|
name = Column(String, nullable=False)
|
|
distribution_type = Column(String, nullable=False)
|
|
parameters = Column(JSON, nullable=True)
|
|
|
|
def __repr__(self):
|
|
return f"<Distribution id={self.id} name={self.name} type={self.distribution_type}>"
|