keymedia/managemedia/models/movies.py

21 lines
1002 B
Python
Raw Normal View History

2020-06-08 20:25:22 -04:00
from django.db import models
2020-06-12 15:43:36 -04:00
from django.core import validators
2020-06-12 17:49:58 -04:00
from .common import VideoFields,MediaTypes
2020-06-09 11:18:39 -04:00
class Movies(VideoFields):
2020-06-12 15:43:36 -04:00
original_title = models.CharField('Original Title', max_length=256, blank=True)
2020-06-12 17:49:58 -04:00
tagline = models.CharField('Tagline', blank=True, max_length=256)
2020-06-08 20:25:22 -04:00
runtime = models.PositiveIntegerField('Total Runtime', blank=True)
2020-06-12 15:43:36 -04:00
rt_rating = models.PositiveIntegerField('Rotten Tomatoes Rating', blank=True)
2020-06-08 20:25:22 -04:00
am_rating = models.DecimalField('AllMovie Rating', max_digits=3, decimal_places=1, blank=True)
2020-06-08 19:21:18 -04:00
2020-06-09 11:18:39 -04:00
class MovieAltTitles(models.Model):
film = models.ForeignKey('Movies', on_delete=models.CASCADE)
2020-06-12 17:49:58 -04:00
title = models.CharField('Title', max_length=256)
country = models.CharField('Country', max_length=256)
title_type = models.CharField('Type', blank=True, max_length=256)
2020-06-08 19:21:18 -04:00
2020-06-09 11:18:39 -04:00
class MovieGenres(models.Model):
movie = models.ForeignKey('Movies', on_delete=models.CASCADE)
2020-06-08 19:21:18 -04:00
genre = models.ForeignKey('Genres', on_delete=models.CASCADE)