Spaces:
Sleeping
Sleeping
| # Generated by Django 5.2.4 on 2025-08-18 10:42 | |
| import django.db.models.deletion | |
| from django.db import migrations, models | |
| class Migration(migrations.Migration): | |
| initial = True | |
| dependencies = [ | |
| ('Accounts', '0001_initial'), | |
| ('Boxes', '0001_initial'), | |
| ] | |
| operations = [ | |
| migrations.CreateModel( | |
| name='SalesReport', | |
| fields=[ | |
| ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | |
| ('date', models.DateField()), | |
| ('total_orders', models.IntegerField()), | |
| ('total_revenue', models.DecimalField(decimal_places=2, max_digits=12)), | |
| ('top_box', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='Boxes.mysterybox')), | |
| ], | |
| ), | |
| migrations.CreateModel( | |
| name='UserStats', | |
| fields=[ | |
| ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | |
| ('total_spent', models.DecimalField(decimal_places=2, default=0.0, max_digits=12)), | |
| ('boxes_purchased', models.IntegerField(default=0)), | |
| ('last_active', models.DateTimeField(auto_now=True)), | |
| ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='Accounts.profile')), | |
| ], | |
| ), | |
| ] | |