17 lines
671 B
Python
17 lines
671 B
Python
from django.db import models
|
|
from .common import CommonMediaFields
|
|
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)
|