19 lines
500 B
Python
19 lines
500 B
Python
from django.db import models
|
|
|
|
# Create your models here.
|
|
from core.wagtail_utils import StrictHierarchyPage
|
|
from users.models import User
|
|
|
|
|
|
# todo: change from Highlight to Bookmark / Note (tbd)
|
|
class Highlight(models.Model):
|
|
id = models.UUIDField(primary_key=True)
|
|
user = models.ForeignKey(User, on_delete=models.CASCADE)
|
|
|
|
class Meta:
|
|
abstract = True
|
|
|
|
|
|
class ContentBlockHighlight(Highlight):
|
|
content_block = models.ForeignKey('books.ContentBlock', on_delete=models.CASCADE)
|