Adds ReviewRating model
I can't just calling Rating because that would clash with the rating field
This commit is contained in:
@ -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
|
||||
|
@ -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'
|
||||
|
Reference in New Issue
Block a user