partybot/models.py

32 lines
878 B
Python
Raw Normal View History

from sqlalchemy import Column, ForeignKey, Integer, String, Boolean
from database import Base
class Optout(Base):
__tablename__ = 'optout'
id = Column(Integer, primary_key=True)
userid = Column(Integer, unique=True)
class Karma(Base):
__tablename__ = 'karma'
id = Column(Integer, primary_key=True)
userid = Column(Integer)
chanid = Column(Integer)
karma = Column(Integer)
class Queue(Base):
__tablename__ = 'queue'
id = Column(Integer, primary_key=True)
msg = Column(String(2048))
class Preferences(Base):
__tablename__ = 'preferences'
id = Column(Integer, primary_key=True)
userid = Column(Integer, unique=True)
chimpnut = Column(Boolean)
2019-02-17 18:08:01 +00:00
class MdnpRequests(Base):
__tablename__ = 'requests'
id = Column(Integer, primary_key=True)
userid = Column(Integer, unique=True)
requests = Column(Integer)