dsfdsf
This commit is contained in:
parent
a69bd20c63
commit
dbf3006e2f
6 changed files with 5 additions and 23 deletions
|
@ -1,8 +1,6 @@
|
|||
from sqlalchemy import *
|
||||
from sqlalchemy.orm import relationship
|
||||
from files.__main__ import Base
|
||||
from files.helpers.lazy import lazy
|
||||
import time
|
||||
|
||||
class UserBlock(Base):
|
||||
|
||||
|
@ -15,10 +13,4 @@ class UserBlock(Base):
|
|||
target = relationship("User", primaryjoin="User.id==UserBlock.target_id", viewonly=True)
|
||||
|
||||
def __repr__(self):
|
||||
|
||||
return f"<UserBlock(user={user.username}, target={target.username})>"
|
||||
|
||||
@property
|
||||
@lazy
|
||||
def created_date(self):
|
||||
return time.strftime("%d %b %Y", time.gmtime(self.created_utc))
|
||||
return f"<UserBlock(user={self.user_id}, target={self.target_id})>"
|
Loading…
Add table
Add a link
Reference in a new issue