átlagos kiegészítséek jó sok
This commit is contained in:
27
backend/app/models/system/translation.py
Executable file
27
backend/app/models/system/translation.py
Executable file
@@ -0,0 +1,27 @@
|
||||
# /opt/docker/dev/service_finder/backend/app/models/system/translation.py
|
||||
from sqlalchemy import String, Integer, Text, Boolean, text
|
||||
from sqlalchemy.orm import Mapped, mapped_column
|
||||
|
||||
# MB 2.0: A központi aszinkron adatbázis motorból húzzuk be a Base-t
|
||||
from app.database import Base
|
||||
|
||||
class Translation(Base):
|
||||
"""
|
||||
Többnyelvűséget támogató tábla a felületi elemekhez és dinamikus tartalmakhoz.
|
||||
"""
|
||||
__tablename__ = "translations"
|
||||
__table_args__ = {"schema": "system"}
|
||||
|
||||
id: Mapped[int] = mapped_column(Integer, primary_key=True, index=True)
|
||||
|
||||
# A fordítandó kulcs (pl. 'NAV_DASHBOARD' vagy 'ERR_USER_NOT_FOUND')
|
||||
key: Mapped[str] = mapped_column(String(255), index=True)
|
||||
|
||||
# Nyelvi kód (pl: 'hu', 'en', 'de')
|
||||
lang: Mapped[str] = mapped_column(String(5), index=True)
|
||||
|
||||
# A tényleges fordított szöveg
|
||||
value: Mapped[str] = mapped_column(Text)
|
||||
|
||||
# --- JAVÍTÁS: A diagnosztika által hiányolt publikációs állapot ---
|
||||
is_published: Mapped[bool] = mapped_column(Boolean, default=True, server_default=text("true"))
|
||||
Reference in New Issue
Block a user