keymedia/managemedia/models/books.py

17 lines
631 B
Python
Raw Normal View History

2020-06-08 20:25:22 -04:00
from django.db import models
class Book(CommonMediaFields)
author = models.ForeignKey('Author')
series = models.ForeignKey('Series', blank=True)
series_entry = models.BooleanField('Series Entry', blank=True)
is_comic = models.BooleanField('Comic')
is_manga = models.BooleanField('Manga')
class Author(models.Model)
name = models.CharFields('Author', unique=True)
sort_name = models.CharFields('Author sort name', blank=True)
class Series(models.Model)
name = models.CharFields('Series', unique=True)
total_entries = models.PositiveIntegerField('Total Entries', blank=True)