Improved TableABC
This commit is contained in:
parent
01c7e155c3
commit
dec137220c
@ -7,8 +7,8 @@ class TableABC(ABC):
|
||||
|
||||
@abstractmethod
|
||||
def __init__(self):
|
||||
self._created_at: Optional[datetime] = None
|
||||
self._modified_at: Optional[datetime] = None
|
||||
self._created_at: Optional[datetime] = datetime.now().isoformat()
|
||||
self._modified_at: Optional[datetime] = datetime.now().isoformat()
|
||||
|
||||
@property
|
||||
def created_at(self) -> datetime:
|
||||
@ -18,6 +18,10 @@ class TableABC(ABC):
|
||||
def modified_at(self) -> datetime:
|
||||
return self._modified_at
|
||||
|
||||
@modified_at.setter
|
||||
def modified_at(self, value: datetime):
|
||||
self._modified_at = value
|
||||
|
||||
@staticmethod
|
||||
@abstractmethod
|
||||
def get_create_string() -> str: pass
|
||||
|
Loading…
Reference in New Issue
Block a user