[New Feature] Rest API implementation to showcase the OpenDBM features

This commit is contained in:
Rudy Haryanto
2022-10-04 03:07:29 +07:00
parent a574bc6870
commit 92e08860a8
41 changed files with 2576 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
from sqlalchemy.orm import Session
from config.db import get_db
user_db = get_db()
class DBSessionContext(object):
def __init__(self, db: Session):
self.db = db
class AppService(DBSessionContext):
pass
class AppCRUD(DBSessionContext):
pass
class OpenDBMSessionContext(object):
def __init__(self):
self.db = user_db