Implement distribution management API and UI forms; add distribution model and tests

This commit is contained in:
2025-10-20 18:51:23 +02:00
parent 4533a4c166
commit 0b19a93e0d
10 changed files with 229 additions and 2 deletions

14
models/distribution.py Normal file
View File

@@ -0,0 +1,14 @@
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}>"