Adds ReviewRating model

I can't just calling Rating because that would clash with the rating
field
This commit is contained in:
Mouse Reeve
2021-01-01 11:05:49 -08:00
parent 521934b4f3
commit 385ec4d70a
6 changed files with 86 additions and 8 deletions

View File

@ -6,7 +6,8 @@ from .base_activity import ActivityEncoder, Signature
from .base_activity import Link, Mention
from .base_activity import ActivitySerializerError, resolve_remote_id
from .image import Image
from .note import Note, GeneratedNote, Article, Comment, Review, Quotation
from .note import Note, GeneratedNote, Article, Comment, Quotation
from .note import Review, Rating
from .note import Tombstone
from .interaction import Boost, Like
from .ordered_collection import OrderedCollection, OrderedCollectionPage

View File

@ -50,6 +50,13 @@ class Comment(Note):
type: str = 'Comment'
@dataclass(init=False)
class Quotation(Comment):
''' a quote and commentary on a book '''
quote: str
type: str = 'Quotation'
@dataclass(init=False)
class Review(Comment):
''' a full book review '''
@ -59,7 +66,8 @@ class Review(Comment):
@dataclass(init=False)
class Quotation(Comment):
''' a quote and commentary on a book '''
quote: str
type: str = 'Quotation'
class Rating(Comment):
''' a full book review '''
rating: int = None
content: str = None
type: str = 'Rating'