mirror of
https://gitflic.ru/project/alt-gnome/karkas.git
synced 2025-09-26 18:29:06 +03:00
Изменение в моделях баз данных. Добавлен README.md к модулю DataBase с информацией о базе данных.
This commit is contained in:
9
src/modules/standard/database/models/chat_stats.py
Normal file
9
src/modules/standard/database/models/chat_stats.py
Normal file
@@ -0,0 +1,9 @@
|
||||
import peewee as pw
|
||||
|
||||
|
||||
class ChatStats(pw.Model):
|
||||
class Meta:
|
||||
...
|
||||
chat_id = pw.IntegerField(null=False)
|
||||
date = pw.DateField(null=False)
|
||||
messages_count = pw.IntegerField(null=False, default=0)
|
@@ -4,6 +4,7 @@ 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)
|
||||
chat_id = pw.IntegerField(null=False)
|
||||
chat_name = pw.CharField(null=False)
|
||||
chat_type = pw.IntegerField(null=False, default=10)
|
||||
chat_all_stat = pw.IntegerField(null=False)
|
||||
|
@@ -4,6 +4,10 @@ import peewee as pw
|
||||
class Messages(pw.Model):
|
||||
class Meta:
|
||||
...
|
||||
message_chat_id = pw.IntegerField(null=False)
|
||||
message_id = pw.IntegerField(null=False)
|
||||
message_sender_id = pw.IntegerField(null=False)
|
||||
answer_to_message_id = pw.IntegerField(null=True)
|
||||
message_ai_model = pw.TextField(null=True)
|
||||
message_text = pw.TextField(null=False)
|
||||
message_id_sender = pw.IntegerField(null=False)
|
||||
answer_to_id = pw.IntegerField(null=True)
|
||||
|
||||
|
10
src/modules/standard/database/models/user_stats.py
Normal file
10
src/modules/standard/database/models/user_stats.py
Normal file
@@ -0,0 +1,10 @@
|
||||
import peewee as pw
|
||||
|
||||
|
||||
class UserStats(pw.Model):
|
||||
class Meta:
|
||||
...
|
||||
chat_id = pw.IntegerField(null=False)
|
||||
user_id = pw.IntegerField(null=False)
|
||||
date = pw.DateField(null=False)
|
||||
messages_count = pw.IntegerField(null=False, default=0)
|
@@ -4,8 +4,9 @@ import peewee as pw
|
||||
class Users(pw.Model):
|
||||
class Meta:
|
||||
...
|
||||
user_name = pw.CharField(null=False) # до 255 символов
|
||||
user_id = pw.IntegerField(null=False)
|
||||
user_tag = pw.CharField(null=True)
|
||||
user_role = pw.IntegerField(null=True)
|
||||
user_stats = pw.IntegerField(null=True)
|
||||
user_rep = pw.IntegerField(null=True)
|
||||
user_name = pw.CharField(null=False) # до 255 символов
|
||||
user_role = pw.IntegerField(null=True, default=3)
|
||||
user_stats = pw.IntegerField(null=True, default=0)
|
||||
user_rep = pw.IntegerField(null=True, default=0)
|
||||
|
Reference in New Issue
Block a user