MarseyWorld/files/classes/domains.py

18 lines
450 B
Python
Raw Normal View History

2022-05-04 23:09:46 +00:00
from sqlalchemy import *
from files.__main__ import Base
2022-09-12 10:19:35 +00:00
import time
2022-05-04 23:09:46 +00:00
class BannedDomain(Base):
__tablename__ = "banneddomains"
domain = Column(String, primary_key=True)
reason = Column(String)
created_utc = Column(Integer)
def __init__(self, *args, **kwargs):
if "created_utc" not in kwargs: kwargs["created_utc"] = int(time.time())
super().__init__(*args, **kwargs)
def __repr__(self):
return f"<BannedDomain(domain={self.domain})>"