models.py 723 B

12345678910111213141516171819
  1. from django.db import models
  2. class RedditUser(models.Model):
  3. name = models.CharField(unique=True, max_length=30, null=False, blank=False)
  4. # Indicates if the user has generally posted anything to the subreddit previously.
  5. # Used to determine whether to send the user a welcome message when they make a comment
  6. has_generally_interacted = models.BooleanField(default=False)
  7. # Indicates if the user has submitted posts (non comments) to the subreddit previously.\
  8. # Used to determine whether to remove a submission made by a new user
  9. has_previously_submitted = models.BooleanField(default=False)
  10. class Meta:
  11. db_table = 'reddit_users'
  12. def __str__(self):
  13. return self.name