keymedia/managemedia/models/vgames.py

27 lines
938 B
Python
Raw Normal View History

2020-06-08 20:25:22 -04:00
from django.db import models
2020-06-08 19:21:18 -04:00
class VGames(CommonMediaFields)
tgdb_id = models.PositiveIntegerField('TheGamesDB ID')
platform = models.ForeignKey('Platform')
2020-06-08 20:25:22 -04:00
cover = models.ImageField('Cover Image', blank=True)
players = models.PositiveIntegerField('Players', blank=True)
coop = models.BooleanField('Co-Op', blank=True)
mc_rating = models.PositiveIntegerFrield('MetaCritic Rating', max_value=100, blank=True)
2020-06-08 19:21:18 -04:00
2020-06-08 20:25:22 -04:00
class Publishers(models.Model)
name = models.CharField('Publisher Name')
class Developers(models.Model)
name = models.CharField('Developer Name')
class Platforms(models.Model)
name = models.CharField('Game System')
class PublisherMap(models.Model)
publisher = models.ForeignKey('Publishers')
game = models.ForeignKey('VGames')
class DeveloperMap(models.Model)
developer = models.ForeignKey('Developers')
game = models.ForeignKey('VGames')