2018-07-10 09:04:19 +02:00
|
|
|
from titanembeds.database import db
|
2017-05-06 10:03:52 +02:00
|
|
|
|
2018-07-10 09:04:19 +02:00
|
|
|
class Messages(db.Model):
|
2017-05-06 10:03:52 +02:00
|
|
|
__tablename__ = "messages"
|
2018-01-23 22:08:55 +01:00
|
|
|
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
|
2018-07-10 09:04:19 +02:00
|
|
|
embeds = db.Column(db.Text().with_variant(db.Text(length=4294967295), 'mysql')) # message embeds
|