Исправлены импорты внутри модулей, добавлены: модуль для исключений, скрипт инициализации путей, переделано подключение к бд

This commit is contained in:
ilyazheprog
2023-12-10 23:04:17 +07:00
parent 88db66c360
commit 1e7c70078b
38 changed files with 198 additions and 77 deletions

View File

@@ -0,0 +1 @@

View File

@@ -0,0 +1,9 @@
import peewee as pw
class Chats(pw.Model):
class Meta:
...
chat_role = pw.IntegerField(null=False, default=1)
chat_stats = pw.IntegerField(null=False)
chat_federation = pw.IntegerField(null=False)

View File

@@ -0,0 +1,9 @@
import peewee as pw
class Messages(pw.Model):
class Meta:
...
message_text = pw.TextField(null=False)
message_id_sender = pw.IntegerField(null=False)
answer_to_id = pw.IntegerField(null=True)

View File

@@ -0,0 +1,11 @@
import peewee as pw
class Users(pw.Model):
class Meta:
...
user_name = pw.CharField(null=False) # до 255 символов
user_tag = pw.CharField(null=True)
user_role = pw.IntegerField(null=True)
user_stats = pw.IntegerField(null=True)
user_rep = pw.IntegerField(null=True)