1
0
Fork 0
This repository has been archived on 2024-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
Administrator-py/db/Polls.py

22 lines
794 B
Python
Raw Normal View History

from db import Base
from sqlalchemy import Column, Integer, BigInteger, String, Boolean
class Polls(Base):
__tablename__ = "polls"
id = Column(Integer, primary_key=True)
message = Column(BigInteger, nullable=False, unique=True)
channel = Column(BigInteger, nullable=False)
guild = Column(BigInteger, nullable=False)
author = Column(BigInteger, nullable=False)
reactions = Column(String, nullable=False)
multi = Column(Boolean, nullable=False, default=False)
def __init__(self, message: int, channel: int, guild: int, author: int, reactions: [str], multi: bool = False):
self.message = message
self.channel = channel
self.guild = guild
self.author = author
self.reactions = str(reactions)
self.multi = multi