keymedia/managemedia/models/tv.py

17 lines
819 B
Python
Raw Normal View History

2020-06-08 20:25:22 -04:00
from django.db import models
2020-06-12 17:49:58 -04:00
from .common import VideoFields,MediaTypes
2020-06-12 11:17:30 -04:00
class Television(VideoFields):
2020-06-12 15:43:36 -04:00
episodes = models.PositiveIntegerField('Number of Episodes', blank=True)
seasons = models.PositiveIntegerField('Number of Seasons', blank=True)
2020-06-08 20:25:22 -04:00
first_aired = models.DateField('First Aired Date', blank=True)
last_aired = models.DateField('Last Aired Date', blank=True)
2020-06-12 15:43:36 -04:00
networks = models.ForeignKey('Networks', on_delete=models.CASCADE, blank=True)
2020-06-12 17:49:58 -04:00
status = models.CharField('Status', blank=True, max_length=256)
2020-06-08 20:25:22 -04:00
2020-06-12 11:17:30 -04:00
class Networks(models.Model):
2020-06-12 17:49:58 -04:00
name = models.CharField('Network', max_length=256)
2020-06-08 20:25:22 -04:00
2020-06-12 11:17:30 -04:00
class ShowtoNetworks(models.Model):
2020-06-12 15:43:36 -04:00
show = models.ForeignKey('Television', on_delete=models.CASCADE)
network = models.ForeignKey('Networks', on_delete=models.CASCADE)