diff --git a/api/__pycache__/settings.cpython-312.pyc b/api/__pycache__/settings.cpython-312.pyc index 28958eac..2c44e476 100644 Binary files a/api/__pycache__/settings.cpython-312.pyc and b/api/__pycache__/settings.cpython-312.pyc differ diff --git a/api/settings.py b/api/settings.py index 32b12399..050da398 100644 --- a/api/settings.py +++ b/api/settings.py @@ -82,7 +82,7 @@ ASGI_APPLICATION = 'api.asgi.application' #prod:5.223.52.193 dev:5.223.42.146 MODE = 'prod' -DBHOST = '172.17.0.1' if MODE == 'prod' else '5.223.52.193' +DBHOST = '172.17.0.1' if MODE == 'prod' else '5.223.42.146' DATABASES = { 'default': { diff --git a/app/__pycache__/models.cpython-312.pyc b/app/__pycache__/models.cpython-312.pyc index 8ed75ef9..1c148972 100644 Binary files a/app/__pycache__/models.cpython-312.pyc and b/app/__pycache__/models.cpython-312.pyc differ diff --git a/app/__pycache__/workflow_actions.cpython-312.pyc b/app/__pycache__/workflow_actions.cpython-312.pyc index 645a5d26..bc11e27a 100644 Binary files a/app/__pycache__/workflow_actions.cpython-312.pyc and b/app/__pycache__/workflow_actions.cpython-312.pyc differ diff --git a/app/migrations/0362_gift.py b/app/migrations/0362_gift.py new file mode 100644 index 00000000..140cdbe9 --- /dev/null +++ b/app/migrations/0362_gift.py @@ -0,0 +1,28 @@ +# Generated by Django 5.1.7 on 2026-01-23 03:09 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('app', '0361_remove_transaction_customer_new_and_more'), + ] + + operations = [ + migrations.CreateModel( + name='Gift', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('code', models.CharField(max_length=30, unique=True)), + ('name', models.CharField(max_length=100)), + ('detail', models.TextField(null=True)), + ('index', models.IntegerField(default=1, null=True)), + ('create_time', models.DateTimeField(auto_now_add=True, null=True)), + ('update_time', models.DateTimeField(auto_now=True, null=True)), + ], + options={ + 'db_table': 'gift', + }, + ), + ] diff --git a/app/models.py b/app/models.py index d19bf8d2..0b75d56a 100644 --- a/app/models.py +++ b/app/models.py @@ -315,6 +315,18 @@ class Discount_Type(models.Model): db_table = 'discount_type' +class Gift(models.Model): + code = models.CharField(max_length=30, null=False, unique=True) + name = models.CharField(max_length=100, null=False) + detail = models.TextField(null=True) + index = models.IntegerField(null=True, default=1) + create_time = models.DateTimeField(null=True, auto_now_add=True) + update_time = models.DateTimeField(null=True, auto_now=True) + + class Meta: + db_table = 'gift' + + class Sale_Policy(models.Model): code = models.CharField(max_length=30, null=False, unique=True) name = models.CharField(max_length=100, null=False)