6c86f0f571
- integrated request-module into module registry - moved backend into modules/request-module - added manifest.json and module.py - implemented dynamic router mounting - implemented dynamic static mounting - removed direct dependencies from platform core - verified startup with request-module - verified startup without request-module - added implementation_report_003.md
19 lines
604 B
Python
19 lines
604 B
Python
"""Priority model."""
|
|
|
|
from sqlalchemy import Column, String, Integer
|
|
from request_app.models.base import Base, TimestampMixin
|
|
|
|
|
|
class Priority(Base, TimestampMixin):
|
|
"""Priority model."""
|
|
|
|
__tablename__ = "priorities"
|
|
|
|
id = Column(Integer, primary_key=True, index=True)
|
|
name = Column(String(50), unique=True, nullable=False)
|
|
level = Column(Integer, nullable=False) # 1=Low, 2=Medium, 3=High, 4=Critical
|
|
default_response_time_minutes = Column(Integer, default=60)
|
|
|
|
def __repr__(self) -> str:
|
|
return f"<Priority(id={self.id}, name='{self.name}', level={self.level})>"
|