blob: db459e7c2daa0d2f2e8a71b28746a004d4c74019 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
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]
|