--- /dev/null
+# Generated by Django 4.0.8 on 2023-05-23 09:10
+
+from django.conf import settings
+from django.db import migrations
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ('catalogue', '0043_alter_bookmedia_duration_alter_bookmedia_type'),
+ migrations.swappable_dependency(settings.AUTH_USER_MODEL),
+ ('api', '0005_consumer_nonce_resource_token'),
+ ]
+
+ operations = [
+ migrations.AlterUniqueTogether(
+ name='bookuserdata',
+ unique_together={('user', 'book')},
+ ),
+ ]
complete = models.BooleanField(default=False)
last_changed = models.DateTimeField(auto_now=True)
+ class Meta:
+ unique_together = [('user', 'book')]
+
@property
def state(self):
return 'complete' if self.complete else 'reading'