Initial Commit
This commit is contained in:
11
dto/post.py
Normal file
11
dto/post.py
Normal file
@@ -0,0 +1,11 @@
|
||||
class Post:
|
||||
def __init__(self, author, title, content, url, timestamp):
|
||||
self.author = author
|
||||
self.title = title
|
||||
self.content = content
|
||||
self.url = url
|
||||
self.timestamp = timestamp
|
||||
|
||||
# Optionals
|
||||
self.subreddit = None
|
||||
self.upvotes = None
|
||||
8
dto/user.py
Normal file
8
dto/user.py
Normal file
@@ -0,0 +1,8 @@
|
||||
# Generic User Data Transfer Object for social media platforms
|
||||
class User:
|
||||
def __init__(self, username: str, created_utc: int, ):
|
||||
self.username = username
|
||||
self.created_utc = created_utc
|
||||
|
||||
# Optionals
|
||||
self.karma = None
|
||||
Reference in New Issue
Block a user