Adds inventaire id to book data model

This commit is contained in:
Mouse Reeve 2021-04-06 10:40:39 -07:00
parent f30d05acfc
commit 295842badd
2 changed files with 11 additions and 6 deletions

View file

@ -24,9 +24,10 @@ class Book(ActivityObject):
firstPublishedDate: str = "" firstPublishedDate: str = ""
publishedDate: str = "" publishedDate: str = ""
openlibraryKey: str = "" openlibraryKey: str = None
librarythingKey: str = "" inventiareId: str = None
goodreadsKey: str = "" librarythingKey: str = None
goodreadsKey: str = None
cover: Image = None cover: Image = None
type: str = "Book" type: str = "Book"
@ -68,8 +69,9 @@ class Author(ActivityObject):
died: str = None died: str = None
aliases: List[str] = field(default_factory=lambda: []) aliases: List[str] = field(default_factory=lambda: [])
bio: str = "" bio: str = ""
openlibraryKey: str = "" openlibraryKey: str = None
librarythingKey: str = "" inventiareId: str = None
goodreadsKey: str = "" librarythingKey: str = None
goodreadsKey: str = None
wikipediaLink: str = "" wikipediaLink: str = ""
type: str = "Author" type: str = "Author"

View file

@ -19,6 +19,9 @@ class BookDataModel(ObjectMixin, BookWyrmModel):
openlibrary_key = fields.CharField( openlibrary_key = fields.CharField(
max_length=255, blank=True, null=True, deduplication_field=True max_length=255, blank=True, null=True, deduplication_field=True
) )
inventaire_id = fields.CharField(
max_length=255, blank=True, null=True, deduplication_field=True
)
librarything_key = fields.CharField( librarything_key = fields.CharField(
max_length=255, blank=True, null=True, deduplication_field=True max_length=255, blank=True, null=True, deduplication_field=True
) )