Add model to store reading progress.
This commit is contained in:
parent
b2ccf22191
commit
60f0aa207d
2 changed files with 46 additions and 0 deletions
|
@ -134,6 +134,21 @@ class Tag(FedireadsModel):
|
|||
unique_together = ('user', 'book', 'name')
|
||||
|
||||
|
||||
class ReadThrough(FedireadsModel):
|
||||
''' Store progress through a book in the database. '''
|
||||
user = models.ForeignKey('User', on_delete=models.PROTECT)
|
||||
book = models.ForeignKey('Book', on_delete=models.PROTECT)
|
||||
pages_read = models.IntegerField(
|
||||
null=True,
|
||||
blank=True)
|
||||
start_date = models.DateTimeField(
|
||||
blank=True,
|
||||
null=True)
|
||||
finish_date = models.DateTimeField(
|
||||
blank=True,
|
||||
null=True)
|
||||
|
||||
|
||||
NotificationType = models.TextChoices(
|
||||
'NotificationType', 'FAVORITE REPLY TAG FOLLOW FOLLOW_REQUEST BOOST')
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue