From 0d614cee6911c861896f3c9c88dc8eb52f8d8f63 Mon Sep 17 00:00:00 2001 From: ilyazheprog Date: Wed, 29 Nov 2023 20:09:08 +0700 Subject: [PATCH] =?UTF-8?q?=D0=BC=D0=BE=D0=B4=D1=83=D0=BB=D1=8C=20Database?= =?UTF-8?q?=20=D0=BF=D1=80=D0=B8=D0=B2=D0=B5=D0=B4=D1=91=D0=BD=20=D0=BA=20?= =?UTF-8?q?=D0=BF=D1=80=D0=B0=D0=B2=D0=B8=D0=BB=D1=8C=D0=BD=D0=BE=D0=BC?= =?UTF-8?q?=D1=83=20=D0=B2=D0=B8=D0=B4=D1=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- {tests => src/modules/standart}/__init__.py | 0 src/{core => modules/standart}/database/__init__.py | 0 src/{core => modules/standart}/database/api.py | 6 +++--- src/modules/standart/database/info.json | 6 ++++++ src/{core => modules/standart}/database/models/__init__.py | 0 src/{core => modules/standart}/database/models/base.py | 0 src/{core => modules/standart}/database/models/chats.py | 0 src/{core => modules/standart}/database/models/messages.py | 0 src/{core => modules/standart}/database/models/users.py | 0 .../modules/standart/database/tests}/database/file | 0 {tests => src/modules/standart/database/tests}/test_db.py | 4 ++-- 11 files changed, 11 insertions(+), 5 deletions(-) rename {tests => src/modules/standart}/__init__.py (100%) rename src/{core => modules/standart}/database/__init__.py (100%) rename src/{core => modules/standart}/database/api.py (93%) create mode 100644 src/modules/standart/database/info.json rename src/{core => modules/standart}/database/models/__init__.py (100%) rename src/{core => modules/standart}/database/models/base.py (100%) rename src/{core => modules/standart}/database/models/chats.py (100%) rename src/{core => modules/standart}/database/models/messages.py (100%) rename src/{core => modules/standart}/database/models/users.py (100%) rename {tests => src/modules/standart/database/tests}/database/file (100%) rename {tests => src/modules/standart/database/tests}/test_db.py (95%) diff --git a/tests/__init__.py b/src/modules/standart/__init__.py similarity index 100% rename from tests/__init__.py rename to src/modules/standart/__init__.py diff --git a/src/core/database/__init__.py b/src/modules/standart/database/__init__.py similarity index 100% rename from src/core/database/__init__.py rename to src/modules/standart/database/__init__.py diff --git a/src/core/database/api.py b/src/modules/standart/database/api.py similarity index 93% rename from src/core/database/api.py rename to src/modules/standart/database/api.py index 1ba63e3..3b8ea66 100644 --- a/src/core/database/api.py +++ b/src/modules/standart/database/api.py @@ -1,6 +1,6 @@ -from src.core.database.models.chats import Chats -from src.core.database.models.messages import Messages -from src.core.database.models.users import Users +from src.modules.standart.database.models.chats import Chats +from src.modules.standart.database.models.messages import Messages +from src.modules.standart.database.models.users import Users import peewee as pw diff --git a/src/modules/standart/database/info.json b/src/modules/standart/database/info.json new file mode 100644 index 0000000..db9c2c7 --- /dev/null +++ b/src/modules/standart/database/info.json @@ -0,0 +1,6 @@ +{ + "name": "Database", + "description": "Модуль для работы с БД", + "author": "OCAB Team", + "version": "1.0" +} \ No newline at end of file diff --git a/src/core/database/models/__init__.py b/src/modules/standart/database/models/__init__.py similarity index 100% rename from src/core/database/models/__init__.py rename to src/modules/standart/database/models/__init__.py diff --git a/src/core/database/models/base.py b/src/modules/standart/database/models/base.py similarity index 100% rename from src/core/database/models/base.py rename to src/modules/standart/database/models/base.py diff --git a/src/core/database/models/chats.py b/src/modules/standart/database/models/chats.py similarity index 100% rename from src/core/database/models/chats.py rename to src/modules/standart/database/models/chats.py diff --git a/src/core/database/models/messages.py b/src/modules/standart/database/models/messages.py similarity index 100% rename from src/core/database/models/messages.py rename to src/modules/standart/database/models/messages.py diff --git a/src/core/database/models/users.py b/src/modules/standart/database/models/users.py similarity index 100% rename from src/core/database/models/users.py rename to src/modules/standart/database/models/users.py diff --git a/tests/database/file b/src/modules/standart/database/tests/database/file similarity index 100% rename from tests/database/file rename to src/modules/standart/database/tests/database/file diff --git a/tests/test_db.py b/src/modules/standart/database/tests/test_db.py similarity index 95% rename from tests/test_db.py rename to src/modules/standart/database/tests/test_db.py index 1969dbb..cc7da4b 100644 --- a/tests/test_db.py +++ b/src/modules/standart/database/tests/test_db.py @@ -1,7 +1,7 @@ import unittest -from src.core.database.api import * -from src.core.database.models.base import database +from src.modules.standart.database.api import * +from src.modules.standart.database.models.base import database create_tables(database)