2019-02-17 16:39:23 +00:00
|
|
|
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()
|
2019-02-17 16:39:23 +00:00
|
|
|
|
|
|
|
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)
|