Titan/discordbot/titanembeds/database/messages.py

14 lines
886 B
Python
Raw Normal View History

from titanembeds.database import db
2017-05-06 10:03:52 +02:00
class Messages(db.Model):
2017-05-06 10:03:52 +02:00
__tablename__ = "messages"
message_id = db.Column(db.BigInteger, primary_key=True) # Message snowflake
guild_id = db.Column(db.BigInteger) # Discord guild id
channel_id = db.Column(db.BigInteger) # Channel id
2017-05-06 10:03:52 +02:00
content = db.Column(db.Text()) # Message contents
2017-05-07 02:19:12 +02:00
author = db.Column(db.Text()) # Author json
2017-05-06 10:03:52 +02:00
timestamp = db.Column(db.TIMESTAMP) # Timestamp of when content is created
edited_timestamp = db.Column(db.TIMESTAMP) # Timestamp of when content is edited
mentions = db.Column(db.Text()) # Mentions serialized
attachments = db.Column(db.Text()) # serialized attachments
embeds = db.Column(db.Text().with_variant(db.Text(length=4294967295), 'mysql')) # message embeds