Initial commit
This commit is contained in:
1
Bot/bot/__init__.py
Normal file
1
Bot/bot/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
from .post import * # noqa
|
||||
BIN
Bot/bot/__pycache__/__init__.cpython-311.pyc
Normal file
BIN
Bot/bot/__pycache__/__init__.cpython-311.pyc
Normal file
Binary file not shown.
BIN
Bot/bot/__pycache__/__init__.cpython-39.pyc
Normal file
BIN
Bot/bot/__pycache__/__init__.cpython-39.pyc
Normal file
Binary file not shown.
BIN
Bot/bot/__pycache__/post.cpython-311.pyc
Normal file
BIN
Bot/bot/__pycache__/post.cpython-311.pyc
Normal file
Binary file not shown.
BIN
Bot/bot/__pycache__/post.cpython-39.pyc
Normal file
BIN
Bot/bot/__pycache__/post.cpython-39.pyc
Normal file
Binary file not shown.
24
Bot/bot/post.py
Normal file
24
Bot/bot/post.py
Normal file
@@ -0,0 +1,24 @@
|
||||
from pathlib import Path
|
||||
from sqlitewrapper import Model, Datatype, Row
|
||||
|
||||
|
||||
__all__ = (
|
||||
'Datatype',
|
||||
'Posts',
|
||||
'Row',
|
||||
)
|
||||
|
||||
|
||||
class Posts(Model):
|
||||
def __init__(self, db_name: str, save_path: Path) -> None:
|
||||
self.__table = {
|
||||
'username': Datatype.STR,
|
||||
'title': Datatype.STR,
|
||||
'text': Datatype.STR,
|
||||
'post_id': Datatype.STR,
|
||||
'deletion_method': Datatype.STR,
|
||||
'post_last_edit': Datatype.STR,
|
||||
'record_created': Datatype.STR,
|
||||
'record_edited': Datatype.STR,
|
||||
}
|
||||
super().__init__(db_name, save_path, **self.__table)
|
||||
Reference in New Issue
Block a user