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/WarnAction.py

20 lines
599 B
Python
Raw Normal View History

2020-08-02 19:41:38 +02:00
from datetime import timedelta
from db import Base
2020-08-02 20:50:11 +02:00
from sqlalchemy import Column, Integer, BigInteger, String
2020-08-02 19:41:38 +02:00
class WarnAction(Base):
__tablename__ = "warn_actions"
id = Column(Integer, primary_key=True)
guild = Column(BigInteger, nullable=False)
2020-08-02 20:50:11 +02:00
count = Column(Integer, nullable=False, unique=True)
2020-08-02 19:41:38 +02:00
action = Column(String, nullable=False)
duration = Column(BigInteger)
def __init__(self, guild: int, count: int, action: str, duration: float = None):
2020-08-02 19:41:38 +02:00
self.guild = guild
self.count = count
self.action = action
self.duration = duration