mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2026-10-07 04:40:00 +08:00
✨ 添加bot消息发送记录 (#1893)
* ✨ 添加bot消息发送记录 * 💬 文本内容修正 * 🚨 auto fix by pre-commit hooks --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
pre-commit-ci[bot]
parent
13579f5842
commit
4cc800c832
@@ -0,0 +1,29 @@
|
||||
from tortoise import fields
|
||||
|
||||
from zhenxun.services.db_context import Model
|
||||
from zhenxun.utils.enum import BotSentType
|
||||
|
||||
|
||||
class BotMessageStore(Model):
|
||||
id = fields.IntField(pk=True, generated=True, auto_increment=True)
|
||||
"""自增id"""
|
||||
bot_id = fields.CharField(255, null=True)
|
||||
"""bot id"""
|
||||
user_id = fields.CharField(255, null=True)
|
||||
"""目标id"""
|
||||
group_id = fields.CharField(255, null=True)
|
||||
"""群组id"""
|
||||
sent_type = fields.CharEnumField(BotSentType)
|
||||
"""类型"""
|
||||
text = fields.TextField(null=True)
|
||||
"""文本内容"""
|
||||
plain_text = fields.TextField(null=True)
|
||||
"""纯文本"""
|
||||
platform = fields.CharField(255, null=True)
|
||||
"""平台"""
|
||||
create_time = fields.DatetimeField(auto_now_add=True)
|
||||
"""创建时间"""
|
||||
|
||||
class Meta: # pyright: ignore [reportIncompatibleVariableOverride]
|
||||
table = "bot_message_store"
|
||||
table_description = "Bot发送消息列表"
|
||||
Reference in New Issue
Block a user