keymedia/managemedia/models/tv.py

17 lines
693 B
Python

from django.db import models
class Television(VideoFields):
episodes = models.PositiveIntegerField('Number of Episodes', min_value=1, blank=True)
seasons = models.PositiveIntegerField('Number of Seasons', min_value=1, blank=True)
first_aired = models.DateField('First Aired Date', blank=True)
last_aired = models.DateField('Last Aired Date', blank=True)
networks = models.ForeignKey('Networks', blank=True)
status = models.CharField('Status', blank=True)
class Networks(models.Model):
name = models.CharField('Network')
class ShowtoNetworks(models.Model):
show = models.ForeignKey('Television')
network = models.ForeignKey('Networks')