aboutsummaryrefslogtreecommitdiff
path: root/order-service/app/core/database.py
diff options
context:
space:
mode:
Diffstat (limited to 'order-service/app/core/database.py')
-rw-r--r--order-service/app/core/database.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/order-service/app/core/database.py b/order-service/app/core/database.py
new file mode 100644
index 0000000..55d3e82
--- /dev/null
+++ b/order-service/app/core/database.py
@@ -0,0 +1,8 @@
+from sqlalchemy import create_engine
+from sqlalchemy.orm import declarative_base, sessionmaker
+from app.core.config import settings
+
+engine = create_engine(settings.DATABASE_URL)
+SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine)
+
+Base = declarative_base() \ No newline at end of file