aps-agent/server/db/__init__.py

19 lines
808 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# ============================================================
# 主数据数据库包(moduleId: server-db, 可重生 ✅)
# SQLite + SQLAlchemy:主数据/订单/工艺路线/行业模板的持久层。
# world.json 仍承载排产运行态;本包是主数据的「事实源」。
# ============================================================
from server.db.database import get_engine, get_session, init_db, reset_engine
from server.db.sync import (
MASTER_LIST_KEYS, MASTER_DICT_KEYS,
db_has_master, db_to_world, world_to_db,
get_active_project, set_active_project,
)
__all__ = [
"get_engine", "get_session", "init_db", "reset_engine",
"MASTER_LIST_KEYS", "MASTER_DICT_KEYS",
"db_has_master", "db_to_world", "world_to_db",
"get_active_project", "set_active_project",
]