0001_initial.py 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. # Generated by Django 5.2.4 on 2025-09-17 02:33
  2. import django.db.models.deletion
  3. from django.conf import settings
  4. from django.db import migrations, models
  5. class Migration(migrations.Migration):
  6. initial = True
  7. dependencies = [
  8. migrations.swappable_dependency(settings.AUTH_USER_MODEL),
  9. ]
  10. operations = [
  11. migrations.CreateModel(
  12. name='HighScore',
  13. fields=[
  14. ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
  15. ('player_name', models.CharField(max_length=100)),
  16. ('score', models.DecimalField(decimal_places=2, max_digits=10)),
  17. ('days_played', models.IntegerField()),
  18. ('created_at', models.DateTimeField(auto_now_add=True)),
  19. ],
  20. options={
  21. 'ordering': ['-score'],
  22. },
  23. ),
  24. migrations.CreateModel(
  25. name='GameSession',
  26. fields=[
  27. ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
  28. ('session_key', models.CharField(blank=True, max_length=40, null=True)),
  29. ('day', models.IntegerField(default=1)),
  30. ('cash', models.DecimalField(decimal_places=2, default=2000.0, max_digits=10)),
  31. ('debt', models.DecimalField(decimal_places=2, default=5500.0, max_digits=10)),
  32. ('location', models.CharField(default='Downtown', max_length=50)),
  33. ('inventory', models.TextField(default='{}')),
  34. ('capacity', models.IntegerField(default=100)),
  35. ('high_score', models.DecimalField(decimal_places=2, default=0, max_digits=10)),
  36. ('created_at', models.DateTimeField(auto_now_add=True)),
  37. ('updated_at', models.DateTimeField(auto_now=True)),
  38. ('user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
  39. ],
  40. ),
  41. ]