Files
voicelog-plugin/plugin/data.py

30 lines
684 B
Python

from data import Registry, RowModel, Table
from data.columns import String, Timestamp, Integer, Bool
class VoiceLogGuild(RowModel):
_tablename_ = "voicelog_guilds"
_cache_ = {}
guildid = Integer(primary=True)
webhook_url = String()
created_at = Timestamp()
_timestamp = Timestamp()
class VoiceLogSession(RowModel):
_tablename_ = "voicelog_sessions"
_cache_ = {}
sessionid = Integer(primary=True)
guildid = Integer()
userid = Integer()
channelid = Integer()
joined_at = Timestamp()
duration = Integer()
class VoiceLogData(Registry):
voicelog_guilds = VoiceLogGuild.table
voicelog_sessions = VoiceLogSession.table