partybot/models.py

34 lines
935 B
Python
Raw Normal View History

from sqlalchemy import Column, ForeignKey, Integer, String, Boolean
2020-01-29 06:05:49 +00:00
from sqlalchemy.ext.declarative import declarative_base
Base = declarative_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)