about summary refs log tree commit diff
path: root/dropcalc/mxl_types/dao.py
diff options
context:
space:
mode:
Diffstat (limited to 'dropcalc/mxl_types/dao.py')
-rw-r--r--dropcalc/mxl_types/dao.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/dropcalc/mxl_types/dao.py b/dropcalc/mxl_types/dao.py
new file mode 100644
index 0000000..db459e7
--- /dev/null
+++ b/dropcalc/mxl_types/dao.py
@@ -0,0 +1,13 @@
+from sqlalchemy.orm import DeclarativeBase
+
+
+class BaseDAO(DeclarativeBase):
+	__csv_to_db__ = dict()
+
+	def is_valid(self):
+		return True
+
+	def __init__(self, iterable=(), **kwargs):
+		self.__dict__.update(iterable, **kwargs)
+		for this, that in self.__csv_to_db__.items():
+			self.__dict__[this] = self.__dict__[that]