# Path: apps/broadcasts/models.py
# class Broadcast(models.Model):
#     # Metadata.
#     number = models.IntegerField(blank=True, null=True)
#     airdate = models.DateField(default=timezone.now)
#     status = models.CharField(blank=True, max_length=200,
#         help_text='Loosely related to Twitch\'s status field. Does not need to match. Will display on overlays.')
#     notes = models.TextField(blank=True)
# 
#     # Connections.
#     games = models.ManyToManyField(Game, related_name='appears_on')
#     series = models.ForeignKey(Series, blank=True, null=True, related_name='broadcasts',
#         help_text='Is this episode part of an ongoing series (i.e., "Whatever Wednesdays", etc.)?')
# 
#     # Statuses.
#     is_charity = models.BooleanField('is for charity?', default=False,
#         help_text='Is a charity fundraiser involved in this episode?')
#     is_marathon = models.BooleanField('is a marathon?', default=False,
#         help_text='Is this a marathon episode (longer than 12 hours)?')
# 
#     class Meta:
#         get_latest_by = 'airdate'
#         ordering = ['-airdate']
# 
#     def __str__(self):
#         return 'Episode {}'.format(self.number)
# 
#     def get_absolute_url(self):
#         return reverse('broadcast-detail', kwargs={'slug': self.number})
# 
# Path: apps/games/models.py
# class Game(models.Model):
#     # Metadata.
#     name = models.CharField(max_length=200)
#     platform = models.ForeignKey(Platform, null=True, related_name='games')
# 
#     # Imagery.
#     image_art = models.ImageField('art', blank=True, upload_to='games',
#         help_text='16:9 art. Used for backgrounds, etc. Minimum size should be 1280x720.')
#     image_boxart = models.ImageField('boxart', blank=True, upload_to='games',
#         help_text='8:11 art akin to Twitch. Used for supplimentary display, lists, etc.')
# 
#     # Statuses.
#     is_abandoned = models.BooleanField('is abandoned?', default=False,
#         help_text='Has this game been abandoned for good?')
#     is_completed = models.BooleanField('is completed?', default=False,
#         help_text='Has this game been completed (if applicable).' )
# 
#     def __str__(self):
#         return '{}'.format(self.name)
# 
#     @staticmethod
#     def autocomplete_search_fields():
#         return ('name__exact', 'name__icontains')


from django.db import models
from django.utils import timezone
from apps.broadcasts.models import Broadcast
from apps.games.models import Game
# -*- coding: utf-8 -*-



class Quote(models.Model):
    text = models.TextField()
    timestamp = models.DateField(default=timezone.now)
    subject = models.CharField(blank=True, max_length=200,
        help_text='The person that was quoted.')
    creator = models.CharField(blank=True, max_length=200,
        help_text='The person that created the quote.')

# Path: apps/broadcasts/models.py
# class Broadcast(models.Model):
#     # Metadata.
#     number = models.IntegerField(blank=True, null=True)
#     airdate = models.DateField(default=timezone.now)
#     status = models.CharField(blank=True, max_length=200,
#         help_text='Loosely related to Twitch\'s status field. Does not need to match. Will display on overlays.')
#     notes = models.TextField(blank=True)
# 
#     # Connections.
#     games = models.ManyToManyField(Game, related_name='appears_on')
#     series = models.ForeignKey(Series, blank=True, null=True, related_name='broadcasts',
#         help_text='Is this episode part of an ongoing series (i.e., "Whatever Wednesdays", etc.)?')
# 
#     # Statuses.
#     is_charity = models.BooleanField('is for charity?', default=False,
#         help_text='Is a charity fundraiser involved in this episode?')
#     is_marathon = models.BooleanField('is a marathon?', default=False,
#         help_text='Is this a marathon episode (longer than 12 hours)?')
# 
#     class Meta:
#         get_latest_by = 'airdate'
#         ordering = ['-airdate']
# 
#     def __str__(self):
#         return 'Episode {}'.format(self.number)
# 
#     def get_absolute_url(self):
#         return reverse('broadcast-detail', kwargs={'slug': self.number})
# 
# Path: apps/games/models.py
# class Game(models.Model):
#     # Metadata.
#     name = models.CharField(max_length=200)
#     platform = models.ForeignKey(Platform, null=True, related_name='games')
# 
#     # Imagery.
#     image_art = models.ImageField('art', blank=True, upload_to='games',
#         help_text='16:9 art. Used for backgrounds, etc. Minimum size should be 1280x720.')
#     image_boxart = models.ImageField('boxart', blank=True, upload_to='games',
#         help_text='8:11 art akin to Twitch. Used for supplimentary display, lists, etc.')
# 
#     # Statuses.
#     is_abandoned = models.BooleanField('is abandoned?', default=False,
#         help_text='Has this game been abandoned for good?')
#     is_completed = models.BooleanField('is completed?', default=False,
#         help_text='Has this game been completed (if applicable).' )
# 
#     def __str__(self):
#         return '{}'.format(self.name)
# 
#     @staticmethod
#     def autocomplete_search_fields():
#         return ('name__exact', 'name__icontains')


# Path: apps/quotes/models.py
from django.db import models
from django.utils import timezone
from apps.broadcasts.models import Broadcast
from apps.games.models import Game

# -*- coding: utf-8 -*-



class Quote(models.Model):
    text = models.TextField()
    timestamp = models.DateField(default=timezone.now)
    subject = models.CharField(blank=True, max_length=200,
        help_text='The person that was quoted.')
    creator = models.CharField(blank=True, max_length=200,
        help_text='The person that created the quote.')

    broadcast = models.ForeignKey(Broadcast, blank=True, null=True, related_name='quotes')