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