mirror of
https://gitflic.ru/project/alt-gnome/karkas.git
synced 2025-09-26 18:29:06 +03:00
Исправлены импорты внутри модулей, добавлены: модуль для исключений, скрипт инициализации путей, переделано подключение к бд
This commit is contained in:
1
src/modules/standard/database/models/__init__.py
Normal file
1
src/modules/standard/database/models/__init__.py
Normal file
@@ -0,0 +1 @@
|
||||
|
9
src/modules/standard/database/models/chats.py
Normal file
9
src/modules/standard/database/models/chats.py
Normal 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)
|
9
src/modules/standard/database/models/messages.py
Normal file
9
src/modules/standard/database/models/messages.py
Normal 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)
|
11
src/modules/standard/database/models/users.py
Normal file
11
src/modules/standard/database/models/users.py
Normal 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)
|
Reference in New Issue
Block a user