First pass at adding videogames

This commit is contained in:
2023-03-05 02:29:20 -05:00
parent 7d7123498b
commit 25c00d7f1b
13 changed files with 1037 additions and 2 deletions

View File

@ -0,0 +1,125 @@
# Generated by Django 4.1.5 on 2023-03-05 07:16
from django.db import migrations, models
import django_extensions.db.fields
import uuid
class Migration(migrations.Migration):
initial = True
dependencies = []
operations = [
migrations.CreateModel(
name="VideoGame",
fields=[
(
"id",
models.BigAutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
(
"created",
django_extensions.db.fields.CreationDateTimeField(
auto_now_add=True, verbose_name="created"
),
),
(
"modified",
django_extensions.db.fields.ModificationDateTimeField(
auto_now=True, verbose_name="modified"
),
),
(
"run_time",
models.CharField(blank=True, max_length=8, null=True),
),
(
"run_time_ticks",
models.PositiveBigIntegerField(blank=True, null=True),
),
("title", models.CharField(max_length=255)),
("igdb_id", models.IntegerField(blank=True, null=True)),
("alternative_name", models.CharField(max_length=255)),
(
"uuid",
models.UUIDField(
blank=True,
default=uuid.uuid4,
editable=False,
null=True,
),
),
(
"cover",
models.ImageField(
blank=True, null=True, upload_to="games/covers/"
),
),
(
"screenshot",
models.ImageField(
blank=True, null=True, upload_to="games/covers/"
),
),
("rating", models.FloatField(blank=True, null=True)),
("rating_count", models.IntegerField(blank=True, null=True)),
],
options={
"abstract": False,
},
),
migrations.CreateModel(
name="VideoGameCollection",
fields=[
(
"id",
models.BigAutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
(
"created",
django_extensions.db.fields.CreationDateTimeField(
auto_now_add=True, verbose_name="created"
),
),
(
"modified",
django_extensions.db.fields.ModificationDateTimeField(
auto_now=True, verbose_name="modified"
),
),
("name", models.CharField(max_length=255)),
(
"uuid",
models.UUIDField(
blank=True,
default=uuid.uuid4,
editable=False,
null=True,
),
),
(
"cover",
models.ImageField(
blank=True, null=True, upload_to="games/series-covers/"
),
),
("igdb_id", models.IntegerField(blank=True, null=True)),
],
options={
"get_latest_by": "modified",
"abstract": False,
},
),
]

View File

@ -0,0 +1,18 @@
# Generated by Django 4.1.5 on 2023-03-05 07:27
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("videogames", "0001_initial"),
]
operations = [
migrations.AddField(
model_name="videogame",
name="release_date",
field=models.DateTimeField(blank=True, null=True),
),
]