[WIP] Added native mysql support
This commit is contained in:
35
src/cpl_core/database/table_abc.py
Normal file
35
src/cpl_core/database/table_abc.py
Normal file
@@ -0,0 +1,35 @@
|
||||
from abc import ABC, abstractmethod
|
||||
from datetime import datetime
|
||||
from typing import Optional
|
||||
|
||||
|
||||
class TableABC(ABC):
|
||||
|
||||
@abstractmethod
|
||||
def __init__(self):
|
||||
self._created_at: Optional[datetime] = None
|
||||
self._modified_at: Optional[datetime] = None
|
||||
|
||||
@property
|
||||
def CreatedAt(self) -> datetime:
|
||||
return self._created_at
|
||||
|
||||
@property
|
||||
def LastModifiedAt(self) -> datetime:
|
||||
return self._modified_at
|
||||
|
||||
@property
|
||||
@abstractmethod
|
||||
def create_string(self) -> str: pass
|
||||
|
||||
@property
|
||||
@abstractmethod
|
||||
def insert_string(self) -> str: pass
|
||||
|
||||
@property
|
||||
@abstractmethod
|
||||
def udpate_string(self) -> str: pass
|
||||
|
||||
@property
|
||||
@abstractmethod
|
||||
def delete_string(self) -> str: pass
|
||||
Reference in New Issue
Block a user