Files
benchcoach-django/teamsnap/models.py
2022-06-10 08:59:22 -05:00

55 lines
1.2 KiB
Python

# Create your models here.
from django.db import models
from benchcoach.users.models import User
class Preferences(models.Model):
user = models.OneToOneField(
User, on_delete=models.CASCADE, related_name="teamsnap_preferences"
)
managed_team_id = models.IntegerField()
class Meta:
verbose_name_plural = "preferences"
class Team(models.Model):
id = models.IntegerField(primary_key=True)
logo = models.ImageField(
upload_to="logos",
height_field=None,
width_field=None,
max_length=100,
null=True,
blank=True,
)
logo_mono = models.ImageField(
upload_to="logos_mono",
height_field=None,
width_field=None,
max_length=100,
null=True,
blank=True,
)
class Opponent(models.Model):
id = models.IntegerField(primary_key=True)
logo = models.ImageField(
upload_to="logos",
height_field=None,
width_field=None,
max_length=100,
null=True,
blank=True,
)
logo_mono = models.ImageField(
upload_to="logos_mono",
height_field=None,
width_field=None,
max_length=100,
null=True,
blank=True,
)