2019-09-29 18:31:01 +02:00
|
|
|
import datetime
|
|
|
|
|
2019-12-16 18:12:10 +01:00
|
|
|
from . import Base
|
2019-09-29 18:31:01 +02:00
|
|
|
from sqlalchemy import Column, Integer, String, BIGINT, TIMESTAMP
|
2019-10-06 01:49:30 +02:00
|
|
|
|
2019-09-29 18:31:01 +02:00
|
|
|
|
2019-12-30 00:48:11 +01:00
|
|
|
class WarnModel(Base):
|
2019-09-29 18:31:01 +02:00
|
|
|
__tablename__ = 'warns'
|
|
|
|
|
|
|
|
id = Column(Integer, primary_key=True)
|
|
|
|
server_id = Column(BIGINT)
|
|
|
|
user_id = Column(BIGINT)
|
|
|
|
reason = Column(String)
|
|
|
|
created_at = Column(TIMESTAMP, default=datetime.datetime.now())
|
|
|
|
|
|
|
|
def __repr__(self):
|
2019-12-30 00:48:11 +01:00
|
|
|
return "<WarnModel(server_id='%s', user_id='%s', reason='%s', " \
|
2019-10-06 01:49:30 +02:00
|
|
|
"created_at='%s')>" \
|
2019-09-29 18:31:01 +02:00
|
|
|
% (self.server_id, self.user_id, self.reason, self.created_at)
|