diff --git a/backend/apps/__pycache__/__init__.cpython-314.pyc b/backend/apps/__pycache__/__init__.cpython-314.pyc new file mode 100644 index 0000000..dc2ab0e Binary files /dev/null and b/backend/apps/__pycache__/__init__.cpython-314.pyc differ diff --git a/backend/apps/exports/__pycache__/__init__.cpython-314.pyc b/backend/apps/exports/__pycache__/__init__.cpython-314.pyc new file mode 100644 index 0000000..e76b423 Binary files /dev/null and b/backend/apps/exports/__pycache__/__init__.cpython-314.pyc differ diff --git a/backend/apps/exports/__pycache__/urls.cpython-314.pyc b/backend/apps/exports/__pycache__/urls.cpython-314.pyc new file mode 100644 index 0000000..1131ee2 Binary files /dev/null and b/backend/apps/exports/__pycache__/urls.cpython-314.pyc differ diff --git a/backend/apps/exports/__pycache__/utils.cpython-314.pyc b/backend/apps/exports/__pycache__/utils.cpython-314.pyc new file mode 100644 index 0000000..ec8983c Binary files /dev/null and b/backend/apps/exports/__pycache__/utils.cpython-314.pyc differ diff --git a/backend/apps/exports/__pycache__/views.cpython-314.pyc b/backend/apps/exports/__pycache__/views.cpython-314.pyc new file mode 100644 index 0000000..d00d1ab Binary files /dev/null and b/backend/apps/exports/__pycache__/views.cpython-314.pyc differ diff --git a/backend/apps/projects/__pycache__/__init__.cpython-314.pyc b/backend/apps/projects/__pycache__/__init__.cpython-314.pyc new file mode 100644 index 0000000..2d1d9b0 Binary files /dev/null and b/backend/apps/projects/__pycache__/__init__.cpython-314.pyc differ diff --git a/backend/apps/projects/__pycache__/models.cpython-314.pyc b/backend/apps/projects/__pycache__/models.cpython-314.pyc new file mode 100644 index 0000000..02ddd40 Binary files /dev/null and b/backend/apps/projects/__pycache__/models.cpython-314.pyc differ diff --git a/backend/apps/projects/__pycache__/serializers.cpython-314.pyc b/backend/apps/projects/__pycache__/serializers.cpython-314.pyc new file mode 100644 index 0000000..d2453fe Binary files /dev/null and b/backend/apps/projects/__pycache__/serializers.cpython-314.pyc differ diff --git a/backend/apps/projects/__pycache__/urls.cpython-314.pyc b/backend/apps/projects/__pycache__/urls.cpython-314.pyc new file mode 100644 index 0000000..84ee009 Binary files /dev/null and b/backend/apps/projects/__pycache__/urls.cpython-314.pyc differ diff --git a/backend/apps/projects/__pycache__/views.cpython-314.pyc b/backend/apps/projects/__pycache__/views.cpython-314.pyc new file mode 100644 index 0000000..f08bedd Binary files /dev/null and b/backend/apps/projects/__pycache__/views.cpython-314.pyc differ diff --git a/backend/apps/projects/migrations/0001_initial.py b/backend/apps/projects/migrations/0001_initial.py new file mode 100644 index 0000000..e1a10b8 --- /dev/null +++ b/backend/apps/projects/migrations/0001_initial.py @@ -0,0 +1,69 @@ +# Generated by Django 5.1.4 on 2026-05-31 07:59 + +import django.db.models.deletion +import uuid +from django.db import migrations, models + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ] + + operations = [ + migrations.CreateModel( + name='Project', + fields=[ + ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)), + ('name', models.CharField(max_length=100)), + ('template_id', models.CharField(default='classic', max_length=50)), + ('card_width', models.IntegerField(default=750)), + ('card_height', models.IntegerField(default=1050)), + ('created_at', models.DateTimeField(auto_now_add=True)), + ('updated_at', models.DateTimeField(auto_now=True)), + ('export_resolution', models.CharField(default='standard', max_length=20)), + ('export_include_back', models.BooleanField(default=True)), + ], + options={ + 'ordering': ['-updated_at'], + }, + ), + migrations.CreateModel( + name='CardLayer', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('card_type', models.CharField(max_length=20)), + ('card_key', models.CharField(max_length=30)), + ('layer_name', models.CharField(max_length=50)), + ('layer_type', models.CharField(max_length=20)), + ('visible', models.BooleanField(default=True)), + ('locked', models.BooleanField(default=False)), + ('opacity', models.FloatField(default=1.0)), + ('z_index', models.IntegerField(default=0)), + ('properties', models.JSONField(default=dict)), + ('project', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='layers', to='projects.project')), + ], + options={ + 'ordering': ['card_key', 'z_index'], + }, + ), + migrations.CreateModel( + name='Asset', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('asset_type', models.CharField(max_length=20)), + ('asset_key', models.CharField(max_length=50)), + ('file_path', models.CharField(max_length=255)), + ('file_name', models.CharField(max_length=100)), + ('width', models.IntegerField(null=True)), + ('height', models.IntegerField(null=True)), + ('uploaded_at', models.DateTimeField(auto_now_add=True)), + ('project', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='assets', to='projects.project')), + ], + options={ + 'ordering': ['-uploaded_at'], + }, + ), + ] diff --git a/backend/apps/projects/migrations/__init__.py b/backend/apps/projects/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/backend/apps/projects/migrations/__pycache__/0001_initial.cpython-314.pyc b/backend/apps/projects/migrations/__pycache__/0001_initial.cpython-314.pyc new file mode 100644 index 0000000..f8b3b6b Binary files /dev/null and b/backend/apps/projects/migrations/__pycache__/0001_initial.cpython-314.pyc differ diff --git a/backend/apps/projects/migrations/__pycache__/__init__.cpython-314.pyc b/backend/apps/projects/migrations/__pycache__/__init__.cpython-314.pyc new file mode 100644 index 0000000..ab5ba40 Binary files /dev/null and b/backend/apps/projects/migrations/__pycache__/__init__.cpython-314.pyc differ diff --git a/backend/apps/templates/__pycache__/__init__.cpython-314.pyc b/backend/apps/templates/__pycache__/__init__.cpython-314.pyc new file mode 100644 index 0000000..47347f0 Binary files /dev/null and b/backend/apps/templates/__pycache__/__init__.cpython-314.pyc differ diff --git a/backend/apps/templates/__pycache__/models.cpython-314.pyc b/backend/apps/templates/__pycache__/models.cpython-314.pyc new file mode 100644 index 0000000..ec410e4 Binary files /dev/null and b/backend/apps/templates/__pycache__/models.cpython-314.pyc differ diff --git a/backend/apps/templates/__pycache__/urls.cpython-314.pyc b/backend/apps/templates/__pycache__/urls.cpython-314.pyc new file mode 100644 index 0000000..f0a394b Binary files /dev/null and b/backend/apps/templates/__pycache__/urls.cpython-314.pyc differ diff --git a/backend/apps/templates/__pycache__/views.cpython-314.pyc b/backend/apps/templates/__pycache__/views.cpython-314.pyc new file mode 100644 index 0000000..f978465 Binary files /dev/null and b/backend/apps/templates/__pycache__/views.cpython-314.pyc differ diff --git a/backend/apps/templates/migrations/0001_initial.py b/backend/apps/templates/migrations/0001_initial.py new file mode 100644 index 0000000..212daa6 --- /dev/null +++ b/backend/apps/templates/migrations/0001_initial.py @@ -0,0 +1,44 @@ +# Generated by Django 5.1.4 on 2026-05-31 07:59 + +import django.db.models.deletion +from django.db import migrations, models + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ] + + operations = [ + migrations.CreateModel( + name='CardTemplate', + fields=[ + ('id', models.CharField(max_length=50, primary_key=True, serialize=False)), + ('name', models.CharField(max_length=100)), + ('description', models.TextField()), + ('preview_image', models.ImageField(null=True, upload_to='templates/previews/')), + ('color_spade', models.CharField(default='#000000', max_length=20)), + ('color_heart', models.CharField(default='#FF0000', max_length=20)), + ('color_club', models.CharField(default='#000000', max_length=20)), + ('color_diamond', models.CharField(default='#FF0000', max_length=20)), + ('color_background', models.CharField(default='#FFFFFF', max_length=20)), + ('default_assets', models.JSONField(default=dict)), + ('created_at', models.DateTimeField(auto_now_add=True)), + ], + options={ + 'ordering': ['name'], + }, + ), + migrations.CreateModel( + name='SuitSymbol', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('suit_name', models.CharField(max_length=20)), + ('svg_path', models.TextField()), + ('color', models.CharField(max_length=20)), + ('template', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='suit_symbols', to='templates.cardtemplate')), + ], + ), + ] diff --git a/backend/apps/templates/migrations/__init__.py b/backend/apps/templates/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/backend/apps/templates/migrations/__pycache__/0001_initial.cpython-314.pyc b/backend/apps/templates/migrations/__pycache__/0001_initial.cpython-314.pyc new file mode 100644 index 0000000..0cdf836 Binary files /dev/null and b/backend/apps/templates/migrations/__pycache__/0001_initial.cpython-314.pyc differ diff --git a/backend/apps/templates/migrations/__pycache__/__init__.cpython-314.pyc b/backend/apps/templates/migrations/__pycache__/__init__.cpython-314.pyc new file mode 100644 index 0000000..c125e45 Binary files /dev/null and b/backend/apps/templates/migrations/__pycache__/__init__.cpython-314.pyc differ diff --git a/backend/apps/templates/urls.py b/backend/apps/templates/urls.py new file mode 100644 index 0000000..7d11d06 --- /dev/null +++ b/backend/apps/templates/urls.py @@ -0,0 +1,9 @@ +from django.urls import path +from .views import template_list, template_detail + +app_name = 'templates' + +urlpatterns = [ + path('templates/', template_list, name='template-list'), + path('templates//', template_detail, name='template-detail'), +] \ No newline at end of file diff --git a/backend/db.sqlite3 b/backend/db.sqlite3 new file mode 100644 index 0000000..153fd5d Binary files /dev/null and b/backend/db.sqlite3 differ diff --git a/backend/poker_api/__pycache__/__init__.cpython-314.pyc b/backend/poker_api/__pycache__/__init__.cpython-314.pyc new file mode 100644 index 0000000..9dd84af Binary files /dev/null and b/backend/poker_api/__pycache__/__init__.cpython-314.pyc differ diff --git a/backend/poker_api/__pycache__/settings.cpython-314.pyc b/backend/poker_api/__pycache__/settings.cpython-314.pyc new file mode 100644 index 0000000..7b36311 Binary files /dev/null and b/backend/poker_api/__pycache__/settings.cpython-314.pyc differ diff --git a/backend/poker_api/__pycache__/urls.cpython-314.pyc b/backend/poker_api/__pycache__/urls.cpython-314.pyc new file mode 100644 index 0000000..ea2d947 Binary files /dev/null and b/backend/poker_api/__pycache__/urls.cpython-314.pyc differ diff --git a/backend/poker_api/__pycache__/wsgi.cpython-314.pyc b/backend/poker_api/__pycache__/wsgi.cpython-314.pyc new file mode 100644 index 0000000..d8442d4 Binary files /dev/null and b/backend/poker_api/__pycache__/wsgi.cpython-314.pyc differ diff --git a/backend/poker_api/settings.py b/backend/poker_api/settings.py index 776d018..82ff720 100644 --- a/backend/poker_api/settings.py +++ b/backend/poker_api/settings.py @@ -61,6 +61,8 @@ TIME_ZONE = 'Asia/Shanghai' USE_I18N = True USE_TZ = True +DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField' + STATIC_URL = 'static/' MEDIA_URL = '/media/' @@ -74,6 +76,6 @@ CORS_ALLOWED_ORIGINS = [ CORS_ALLOW_CREDENTIALS = True REST_FRAMEWORK = { - 'DEFAULT_PAGINATION': 'rest_framework.pagination.PageNumberPagination', + 'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.PageNumberPagination', 'PAGE_SIZE': 20, }