Guest User

Untitled

a guest
Apr 5th, 2018
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. class Comment:
  2. def __init__(self):
  3. self.comment_id = None
  4. self.author = None
  5. self.comment = None
  6. self.timestamp = None
  7. self.parent = None
  8.  
  9.  
  10. class User:
  11. def __init__(self):
  12. self.username = None
  13. self.password = None
  14. self.last_logged_in_at = None
  15. self.comments = []
  16. self.is_logged_in = False
  17.  
  18. def login(self):
  19. self.is_logged_in = True
  20. self.last_logged_in_at = datetime.now()
  21.  
  22. def logout(self):
  23. self.is_logged_in = False
  24.  
  25. def add_comment(self, comment):
  26. pass
  27.  
  28. def edit_comment(self):
  29. pass
  30.  
  31. def delete_comment(self):
  32. pass
  33.  
  34.  
  35. class Moderator(User):
  36. def __init__(self):
  37. User.__init__(self)
  38.  
  39.  
  40. class Admin(User):
  41. def __init__(self):
  42. User.__init__(self)
Add Comment
Please, Sign In to add comment