17 lines
808 B
Python
17 lines
808 B
Python
from sqlalchemy import Column, String, JSON, DateTime, Boolean
|
|
from sqlalchemy.sql import func
|
|
from app.db.base_class import Base
|
|
|
|
class SystemParameter(Base):
|
|
__tablename__ = "system_parameters"
|
|
__table_args__ = {"schema": "data", "extend_existing": True}
|
|
|
|
key = Column(String, primary_key=True, index=True, nullable=False)
|
|
# Csoportosítás az Admin felületnek (pl. 'xp', 'scout', 'routing')
|
|
category = Column(String, index=True, server_default="general")
|
|
value = Column(JSON, nullable=False)
|
|
is_active = Column(Boolean, default=True)
|
|
description = Column(String)
|
|
# Kötelező audit mező: ki módosította utoljára?
|
|
last_modified_by = Column(String, nullable=True)
|
|
updated_at = Column(DateTime(timezone=True), onupdate=func.now(), server_default=func.now()) |