2026.03.29 20:00 Gitea_manager javítás előtt

This commit is contained in:
Roo
2026-03-29 17:59:06 +00:00
parent 03258db091
commit ba8b6579ef
148 changed files with 7951 additions and 591 deletions

View File

@@ -106,7 +106,7 @@ class FinancialLedger(Base):
gross_amount: Mapped[Optional[float]] = mapped_column(Numeric(18, 4))
net_amount: Mapped[Optional[float]] = mapped_column(Numeric(18, 4))
transaction_id: Mapped[uuid.UUID] = mapped_column(
PG_UUID(as_uuid=True), default=uuid.uuid4, nullable=False, index=True
PG_UUID(as_uuid=True), default=uuid.uuid4, nullable=False, unique=True, index=True
)
status: Mapped[LedgerStatus] = mapped_column(
PG_ENUM(LedgerStatus, name="ledger_status", schema="audit"),

View File

@@ -38,8 +38,8 @@ class SystemParameter(Base):
updated_at: Mapped[datetime] = mapped_column(DateTime(timezone=True), onupdate=func.now(), server_default=func.now())
class InternalNotification(Base):
"""
Belső értesítési központ.
"""
Belső értesítési központ.
Ezek az üzenetek várják a felhasználót belépéskor.
"""
__tablename__ = "internal_notifications"
@@ -53,11 +53,33 @@ class InternalNotification(Base):
category: Mapped[str] = mapped_column(String(50), server_default="info")
priority: Mapped[str] = mapped_column(String(20), server_default="medium")
is_read: Mapped[bool] = mapped_column(Boolean, default=False, index=True)
read_at: Mapped[Optional[datetime]] = mapped_column(DateTime(timezone=True), nullable=True)
created_at: Mapped[datetime] = mapped_column(DateTime(timezone=True), server_default=func.now())
data: Mapped[Optional[dict]] = mapped_column(JSONB, nullable=True)
is_read: Mapped[bool] = mapped_column(Boolean, default=False, index=True)
class SystemDataCompletionWeight(Base):
"""Adatkitöltési súlyok rendszerszintű konfigurációja - mely mezők mennyire fontosak a profil teljességéhez."""
__tablename__ = "system_data_completion_weights"
__table_args__ = (
UniqueConstraint('entity_type', 'field_name', name='uix_entity_field'),
{"schema": "system"}
)
id: Mapped[int] = mapped_column(Integer, primary_key=True, autoincrement=True)
entity_type: Mapped[str] = mapped_column(String(50), nullable=False, index=True) # pl: "vehicle", "person", "organization"
field_name: Mapped[str] = mapped_column(String(100), nullable=False, index=True) # pl: "vin", "license_plate", "email"
weight_percent: Mapped[int] = mapped_column(Integer, nullable=False) # 0-100%
is_mandatory: Mapped[bool] = mapped_column(Boolean, default=False)
is_active: Mapped[bool] = mapped_column(Boolean, default=True)
description: Mapped[Optional[str]] = mapped_column(Text)
created_at: Mapped[datetime] = mapped_column(DateTime(timezone=True), server_default=func.now())
updated_at: Mapped[datetime] = mapped_column(DateTime(timezone=True), server_default=func.now(), onupdate=func.now())
# Shadow column that exists in database (should be removed in future migration)
is_read: Mapped[bool] = mapped_column(Boolean, default=False, nullable=False)
class SystemServiceStaging(Base):