mirror of
https://github.com/Haiti-Distributed-Healthcare-System/hdhs.git
synced 2026-10-31 11:56:35 +00:00
19 lines
368 B
Python
19 lines
368 B
Python
from abc import ABC, abstractmethod
|
|
|
|
|
|
class DB(ABC):
|
|
def __init__(self):
|
|
self._model = None
|
|
self.datetime_format = "%Y%m%d_%H%M"
|
|
|
|
@abstractmethod
|
|
def write_model(self):
|
|
pass
|
|
|
|
@abstractmethod
|
|
def parse_database(self) -> dict():
|
|
pass
|
|
|
|
def init_from_json(self, json_model: dict()):
|
|
self._model = json_model
|