33 lines
935 B
Python
33 lines
935 B
Python
from sqlalchemy import Column, ForeignKey, Integer, String, Boolean
|
|
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)
|
|
|
|
class MdnpRequests(Base):
|
|
__tablename__ = 'requests'
|
|
id = Column(Integer, primary_key=True)
|
|
userid = Column(Integer, unique=True)
|
|
requests = Column(Integer)
|